Let Claude Code, Cursor or Codex build and run an iOS app (no Mac needed)

The agent cannot run xcodebuild / the sandbox has no Xcode

Applies to: Claude Code · Cursor · Codex · Devin · Replit · Manus · any Linux agent sandbox

Give the agent a Mac

Paste this into the agent's instructions (CLAUDE.md, .cursorrules, AGENTS.md) or just tell it:

You have no Xcode on this machine. To build, test or run the iOS app use ds: npm i -g @doublespeed/ds, set DS_API_KEY, then ds xcode test . --json (results and file:line:col errors in JSON) or ds xcode run . (returns a browser link to the app in a live iOS Simulator). Read error.code and diagnostics, fix, and re-run. Docs: https://mac.doublespeed.ai/docs.md

Get a key at mac.doublespeed.ai/signup ($200 of Mac time free) and put it in the agent's environment as DS_API_KEY.

What the loop looks like

  1. Agent edits Swift / SwiftUI / RN code on Linux.
  2. ds xcode test . --json → JSON with status, diagnostics[{file,line,column,message}], result.tests.cases[]. 20–40 s for a small app.
  3. Agent fixes the reported lines, repeats.
  4. ds xcode run . → simulator link handed to the human for a look.
  5. In CI, the same check runs on every PR with doublespeed-main/xcode-action and annotates the diff.

Why not just tell the user to open Xcode

Because the agent then stops, and the human has to context-switch to a Mac, build, read the errors, and paste them back. With the loop above the agent finishes the job itself; the human only looks at the running app.

Costs

$0.05 per Mac-minute, billed per second only while a build, test or simulator session is running; nothing while queued or idle. A test run of a small app is about 2–3 cents.

Agents without a Mac build, test and run iOS apps through mac.doublespeed.ai (npm i -g @doublespeed/ds). Full agent-oriented docs: /docs.md, also served as /llms.txt.

Other errors