Xcode and the iOS Simulator for coding agents
A coding agent can write Swift anywhere, but building and running it takes a Mac. offstage cloud gives your agent one over an API, with Xcode installed, for as long as the job takes.
Set up
Create an API key in the console, then paste this into Claude Code or another coding agent. It installs the SDK, runs one command on a real Mac and reports what it verified.
Read https://api.offstage.cloud/SKILL.md and follow it to set up offstage cloud, so you can run builds, tests and commands on a real Mac.
What your agent can do
- Build iOS and macOS apps with
xcodebuild, and read the errors when the build breaks. - Run Swift package tests with
swift test. - Boot a simulator, install and launch an app, and screenshot it with
xcrun simctl. - Open a Mac app in a desktop sandbox and take a screenshot of the screen.
- Hand a desktop sandbox a goal with
runAgent, which Claude carries out on the Mac with your Anthropic API key.
Each sandbox is a macOS 27 account on a Mac Studio M5 Max, with Xcode 27.2 and the iOS 27.2 simulator. It's wiped when it closes.
From code
The same thing through the SDK, for your own agent loop or script.
import { Sandbox } from "offstage-cloud"
const sandbox = await Sandbox.create({ timeoutMs: 20 * 60_000 })
try {
await sandbox.commands.run("git clone --depth 1 https://github.com/org/app")
const build = await sandbox.commands.run(
"xcodebuild -scheme App -sdk iphonesimulator build",
{ cwd: "app" },
)
console.log(build.exitCode, build.stdout.slice(-2000)) // the agent reads the errors and tries again
} finally {
await sandbox.kill()
}
The docs list every call.
Limits
- Simulator create, boot and screenshot have been measured in headless sandboxes. We have not verified a complete iOS Simulator
xcodebuild testrun; validate your project before relying on it. - No sudo and no Homebrew. Install tools into the project or the home directory.
- There is no click or typing API. To drive a UI, use
runAgentor a program that runs on the Mac. - A sandbox lives for up to 24 hours. A team can hold 4 open at once.
- $1.10 an hour, billed by the second, with no minimum. A 10-minute run costs about $0.18.
Try it
New personal accounts get $5 in free credit, about four and a half hours of runtime, with no credit card needed.
Read the docs, see pricing, or talk to an engineer.