Claude Code reads the failed iOS build log, fixes the typo and rebuilds

The annoying part of iOS work from a Linux or Windows box is not writing Swift. It is the loop: change code, wait for a Mac somewhere to build it, read a compile error, try again. When an AI agent writes the code, that loop is where it usually gets stuck, because it never sees the compiler output.

So I tried to give the agent the whole loop: build on a cloud Mac, get the raw build log back, and show the result on an iPhone simulator. The clip above is a real run, recorded in a Linux terminal.

What happens in the clip

  1. I asked Claude Code: build this app for iPhone; if it fails, fix it and show me the screen.
  2. The first build fails. I left a typo on purpose: counter.incremnt() instead of counter.increment().
  3. The agent reads the compile error from the build log (file AscBoxDemoApp.swift, line 23), checks the Counter definition, and fixes the call.
  4. The rebuild succeeds, the app launches on an iPhone simulator, and a screenshot comes back into the chat.

Three jobs in total: the failed build, the successful build and the screenshot. It cost $0.15.

What made the loop work

  • Return the raw compiler error, not a summary. The agent fixed the typo because it got the exact file, line and message. A "build failed" status alone would have sent it guessing.
  • Make the screenshot part of the same request. "Build" is not done until somebody looks at the screen. Asking for the simulator screenshot means the agent checks that the button and the counter are really there.
  • Keep jobs short and billed per job. Each step is a separate job, so a failed attempt costs cents rather than an idle machine left running.

Limits

This runs on the iOS simulator, not a physical iPhone. Anything that needs real hardware (camera, Bluetooth, push on device) still needs a device.

The tool in the clip is xenoci.com, which I work on. If you are doing iOS without a Mac, I'd like to hear where your build loop breaks.