Why cloud agents need a Mac to build iOS
Claude Code and Codex cannot run Xcode or Apple's iOS Simulator in an environment without macOS. The build must run on a Mac, whether you own it, rent it or connect a Macswarm Pod. Claude Code Desktop's local Simulator pane has a separate local-session restriction.
Why does xcodebuild fail in a cloud agent session?
Three facts explain it, and each is about the host, not the agent.
First, Apple ships Xcode and the iOS Simulator for macOS only. Claude Code’s own requirements list says it plainly: “A Mac, since Apple’s iOS Simulator runs only on macOS” (Test iOS apps in the simulator, checked 25 Oct 2026), and Apple’s Xcode SDK and system requirements list a macOS version for every Xcode release (checked 25 Oct 2026).
Second, an Anthropic-hosted Claude Code session does not run on your Mac. Anthropic’s documentation says that “by default, cloud sessions execute on Anthropic’s infrastructure” (Self-hosted environments, checked 25 Oct 2026), and the Simulator page adds: “The simulator pane is available in local sessions only. In cloud and SSH sessions, Claude runs on a machine that can’t reach the simulators on your Mac.” Those are two separate limits: the host of an Anthropic-hosted session is not a Mac, and the Desktop pane is a local feature. A session whose host is a Mac can still drive a Simulator on that host.
Third, OpenAI’s hosted Codex Cloud environment is a container. The linked legacy cloud-environment documentation describes “a default container image called universal, which comes pre-installed with common languages, packages, and tools”, points to a reference Dockerfile in the openai/codex-universal repository, and does not document a macOS option (Codex Cloud (Legacy), checked 25 Oct 2026). That page says nothing about every current Codex execution route; through the Agents API, a task can be routed to a macOS sandbox such as a Macswarm Pod, as Codex on a macOS environment explains.
So a session whose host has no macOS stops at the first xcodebuild. The agent is fine. The host is wrong.
What does an iOS build need?
Not every step needs the same thing. Compiling needs Xcode; running and testing the app needs a Simulator as well; shipping needs signing on top.
| Step | What it needs | Where it runs |
|---|---|---|
| Compile the app | xcodebuild and the iOS SDK, which ship with Xcode |
macOS |
| Run and UI-test in a Simulator | A booted Simulator with a matching iOS runtime, and a way to install, launch, tap and screenshot the app so the agent can check its work: Claude Code Desktop’s local Simulator pane, or an MCP server such as XcodeBuildMCP | macOS |
| Device build, TestFlight or App Store | Signing identities and provisioning, applied through Xcode’s tooling | macOS |
Editing source and testing portable Swift packages may work outside macOS; Apple-platform dependencies still constrain what can run. Swift.org describes open-source Swift on Linux and Windows, and notes that Apple platform frameworks such as UIKit and AppKit depend on an Objective-C runtime that other platforms do not have (About Swift, checked 25 Oct 2026). The wall is the build and the Simulator.
Can a Claude self-hosted environment run on macOS?
Macswarm’s answer rests on a distinction the word cloud blurs: the host that executes a session and the screen that shows a Simulator. Claude Code Desktop’s Simulator pane is local, limited by Anthropic to local sessions on the Mac running the app. The execution host is a different question. Anthropic’s self-hosted environments, in public beta for Team and Enterprise organizations and off by default, run cloud sessions on runners your organization operates; the overview calls a runner “a program running on hosts inside your network”, but it does not establish how to deploy that runner on macOS (Self-hosted environments, checked 25 Oct 2026). For a Mac you own or rent, use a documented local Claude Code or Codex setup. For a hosted Mac, connect a Macswarm environment: Claude reaches the Pod through the self-hosted environment key, Codex through the Agents API webhook with OpenAI API access. Claude Pro and Max users can start a Pod on Macswarm Free or Pro and sign in inside it.
The mechanics of the Macswarm connection are on Claude Code self-hosted environments on macOS.
Can I use my own Mac?
If you own a Mac and run one agent at a time, this is the cheapest path and often the right one.
Claude Code Desktop opens the Simulator pane when Claude builds, runs or checks the app, with a separate Simulator for each session; the pane is in public beta on Pro, Max, Team and Enterprise plans, and building the app follows your session’s permission mode (Test iOS apps in the simulator, checked 25 Oct 2026). The Codex CLI runs on a Mac as well and can call xcodebuild and xcrun simctl like any shell. To run Claude Code on an always-on Mac of your own and drive it from other devices, Anthropic points to Remote Control, which it says is also available on Pro and Max plans (Self-hosted environments, checked 25 Oct 2026).
Trade-offs:
- It ties up the Mac. Builds and Simulators compete for CPU and memory, and the Mac must stay awake for the session.
- The agent runs as you. Building the app runs your project’s build scripts on your Mac.
- Parallel agents compete for one machine. Test concurrency on your own Mac with your project’s build and UI-test workload.
- Nobody else gets a Mac. A teammate on Linux or Windows is still stuck.
What does a rented Mac or metered macOS service provide?
Three vendors rent a dedicated physical Mac mini by the month or by the day, and one, NoMac, sells disposable macOS by the minute. On a dedicated Mac you get root, SSH or a remote desktop and install what you need; NoMac describes a disposable machine that an agent connects to. Prices from each vendor’s own page:
| Vendor | Price | What the vendor describes | Regions | Source |
|---|---|---|---|---|
| MacRun | $139 a month as a CI runner, $169 a month as an “Agent Mac” | A dedicated M6 Mac mini with Xcode and the Simulator preinstalled; Claude Code and Codex preinstalled, signed in with your own subscription | Not named on the site | macrun.dev, checked 25 Oct 2026 |
| MacRent | $159 a month, $89 a week or $15 a day, ex VAT | A dedicated M4 Mac mini, 16 GB, 256 GB, full admin | US West; EU (France, Netherlands) | macrent.cloud, checked 25 Oct 2026 |
| My Remote Mac | $85 a month or $14 a day for an M4 Mac mini | A dedicated physical Mac, root over SSH and VNC; the vendor states a 99.9% SLA | Not named on the site | myremotemac.com, checked 25 Oct 2026 |
| NoMac | $0.80 an hour, billed by the minute, from $10 prepaid | Disposable macOS on Apple silicon with Xcode, root and a Simulator; agents connect over MCP, CLI, API or SSH; a 20 GB drive that the vendor says persists between sessions | Not named on the site | nomac.app, checked 25 Oct 2026 |
How it works with the agents: run the Claude Code CLI or the Codex CLI on the rented Mac, as you would on your own. MacRun says it ships both agents installed.
Trade-offs, which differ by vendor:
- On a dedicated Mac you administer it: Xcode updates, Simulator runtimes, signing certificates, OS patches, the firewall. On NoMac’s disposable machines the question becomes what the vendor keeps on its persistent drive.
- A monthly rental bills all month whether the Mac works or sleeps. NoMac is per minute with no monthly floor.
- One tenant, one machine: several agents on a dedicated Mac share its CPU, disk and Simulators, and any scheduling between them is yours to arrange.
- Whatever credentials you install on a long-lived machine, git keys, API keys and signing identities, stay there until you remove them. Check each vendor’s page for what persists.
Where a rented Mac is the better choice: you want a real Mac you can log into and keep state on, one agent should run around the clock at a fixed price, or your workflow needs daemons and persistent disks. The MacRun and NoMac comparisons go deeper.
How do Claude Code and Codex use a Pod?
Macswarm’s answer is a Pod: a macOS VM on a dedicated Apple silicon Mac mini, built for agent sessions rather than for a person at a desk. Per Inside a Pod, every Pod has the Latest Xcode and the previous major, the current and previous iOS runtimes, three to four pre-booted Simulators leased to agents in turn, Claude Code and Codex, XcodeBuildMCP, and a two-slot build queue. The Macs sit in a data center in the Netherlands or in the US, two Pods per machine. A Pod is a fresh clone of a golden image, belongs to the developer who started it, and is destroyed ten minutes after its last session ends.
Connecting one, as the quickstarts document it:
- Sign up or sign in. Free has 3 Pod-hours once, no card.
- Claude Code: in a Claude Team or Enterprise organization, create a self-hosted environment and copy its key; in Macswarm choose Connect Claude, paste the key and pick EU or US. The status turns to Connected when the first Pod is ready (Claude Code quickstart). Codex: choose Connect Codex, pick a region, copy the webhook URL and paste it into your Agents API environment settings as the sandbox webhook (Codex quickstart).
- Add deploy keys or a GitHub App so Pods can clone private repositories, and store the secrets your builds need.
- Start a session from claude.ai, Claude Desktop or Slack and pick the Macswarm environment, or give Codex a task that needs a Mac. A clean Pod boots from the warm pool, the repository is cloned, and the agent builds with
xcodebuild, leases a Simulator and drives it through XcodeBuildMCP. - The agent commits and pushes; leftover changes go to a rescue branch. Ten minutes after the last session the Pod is destroyed and the meter stops.
Prices, from pricing: Free is 3 Pod-hours, once. Pro is $99 a month for 300 Pod-hours, about $0.33 per included Pod-hour if all 300 are used, with up to four Pods at a time and $0.40 per extra Pod-hour. Team is $399 for 1,500 Pod-hours, up to ten Pods at a time and $0.30 per extra Pod-hour. Enterprise is the fourth plan: from $3,000 a month; reserved Macs, contract capacity, SSO/SAML, invoice billing, EU or US; contact us. A Pod-hour is one Pod for one hour whatever the number of agents on it; two to three active agents per Pod are guaranteed, and more queue for builds and Simulators. Anthropic or OpenAI bill model usage separately.
Trade-offs, stated plainly:
- No SSH. You watch agents through Claude, Codex or the dashboard’s logs and screenshots. If you want to log in, this is the wrong product.
- Pod-local files and caches are destroyed with the Pod, ten minutes after its last session ends. At eight hours, an agent is asked to wrap up and push. A clean build of a large app takes as long as it takes on a Mac mini (Limits and queues).
- Connecting a Claude self-hosted environment requires a Claude Team or Enterprise organization (public beta). Claude Pro and Max users can start a Pod on Macswarm Free or Pro and sign in inside it. Codex requires OpenAI API access.
- Agents belonging to one developer share a Pod; standard-plan Pods may share physical hardware, and Enterprise reserves a pool for the organization (Security). A Pod is not a 24/7 machine.
- Billing follows runtime. Sessions can use short-lived Pods. Runtime, including the ten-minute shutdown window after the last session, consumes Pod-hours; the meter stops when the Pod is destroyed. Pro and Team still carry their monthly subscription when no Pod is running.
- Macswarm is in early access and has published no measurements of boot time or build-queue throughput.
Where a Pod is the better choice: several agents per developer, or several developers without a Mac each; sessions that come and go, paying for runtime rather than for a machine that sits idle all month; agents that must build, launch and tap through the app rather than only run xcodebuild test; and an EU or US region chosen per environment, where session-injected secrets are destroyed with the Pod and environment keys remain stored encrypted by Macswarm (Security, privacy policy).
Which way
| Situation | Path |
|---|---|
| One developer, one agent, a Mac on the desk | Your own Mac |
| One agent that should run around the clock on a machine you control | A rented Mac mini |
| A team on Linux or Windows, or several agents in parallel | A Macswarm Pod |
| Occasional short builds with no monthly commitment | NoMac by the minute, or Macswarm Free for 3 Pod-hours, once |
| Requires hardware not shared with other organizations | A dedicated rented Mac, or Macswarm Enterprise with a reserved pool |
Step-by-step setup for each path is in Run Claude Code and Codex on a cloud Mac, and iOS Simulator for coding agents covers the Simulator side. If what you need is a test matrix on every push rather than an agent session, that is CI, not an agent host: What a GitHub Actions macOS runner really costs in 2026 prices it, and macOS CI runners pricing compared lists the runner vendors.
FAQ
Can Claude Code use the iOS Simulator in a cloud session?
Yes, if the session has access to a Mac with Simulator tooling. Claude Code Desktop’s local Simulator pane is a separate feature limited to local sessions: Anthropic’s documentation says the pane is available in local sessions only, and that in cloud and SSH sessions Claude runs on a machine that cannot reach the simulators on your Mac (Claude Code docs, Test iOS apps in the simulator, checked 25 Oct 2026). An Anthropic-hosted session has no Mac. A session routed to a Macswarm environment runs on a Pod, where the agent builds with xcodebuild and drives pre-booted Simulators through XcodeBuildMCP.
Do I need a Mac to build an iOS app with Claude Code?
Yes, somewhere. Xcode and the iOS Simulator run only on macOS. The Mac can be your own, with Claude Code Desktop or the CLI; a rented Mac you administer; or a Macswarm Pod that your Claude Code or Codex sessions connect to. Connecting a Claude self-hosted environment requires a Claude Team or Enterprise organization (public beta); Claude Pro and Max users can instead start a Pod on Macswarm Free or Pro and sign in inside it.
Can Codex build and run an iOS app?
Codex can run xcodebuild and drive a Simulator when it runs on a Mac: through the Codex CLI on your own or a rented Mac, or through a session routed to Macswarm as the macOS sandbox by the OpenAI Agents API, which needs an OpenAI account with API access. The linked legacy Codex cloud-environment documentation describes a container-based environment with a default image called universal; it does not document a macOS option (checked 25 Oct 2026). That absence is not proof about every current Codex execution route.
Can a Claude self-hosted environment run on a Mac?
Anthropic’s overview describes a runner as a program on hosts inside your network, like a self-hosted CI runner, and does not establish how to deploy its runner on macOS (checked 25 Oct 2026). For your own or a rented Mac, use a documented local Claude Code or Codex setup. For Macswarm’s supported connection path, follow the quickstarts: you paste the environment’s key into Macswarm, and sessions that pick that environment run on a Pod.
Sources
- Simulator pane requirements, the local-sessions-only rule, a separate Simulator per session and permission mode: code.claude.com, Test iOS apps in the simulator, checked 25 Oct 2026.
- Self-hosted environments: plans, default execution on Anthropic's infrastructure, the runner model, custom tooling, Remote Control: code.claude.com, Self-hosted environments, checked 25 Oct 2026.
- Codex cloud environment and the universal container image: developers.openai.com, Codex cloud environments, which resolved to a page titled Codex Cloud (Legacy), checked 25 Oct 2026.
- Xcode's macOS requirement: developer.apple.com, Xcode SDK and system requirements, checked 25 Oct 2026.
- Swift outside Apple platforms: swift.org, About Swift, checked 25 Oct 2026.
- Rented Mac prices: macrun.dev, macrent.cloud, myremotemac.com, nomac.app, all vendor pages, checked 25 Oct 2026.
- Macswarm Pod contents, limits, prices and isolation: Inside a Pod, Limits and queues, Security, pricing.