The fix
The iOS Simulator is a macOS application; it cannot run in a Linux container or a Codespace. From any of those environments you can still get one:
npm install -g @doublespeed/ds
export DS_API_KEY=dsx_... # https://mac.doublespeed.ai/signup
ds xcode run . --device "iPhone 16 Pro"
# → https://…/session/… open it in a browser: the app running in a real simulator, tap/type/swipe
The session boots on a Mac in the fleet, streams the screen to the browser, accepts input, and is erased when you stop it (ds xcode stop <job> or the idle timeout). Billing is per second while the session is open.
Why containers can't do this
The simulator is a userland process that depends on macOS frameworks and Apple's kernel; Docker on Linux runs Linux kernels only, and Docker on a Mac runs a Linux VM. Codespaces, Replit, Gitpod and agent sandboxes are all Linux. macOS-in-a-container projects (docker-osx and friends) violate Apple's EULA and do not run the simulator reliably.
Using it from a coding agent
ds xcode run . --json prints the preview URL as an event; an agent can hand that to a human ("open this and try the flow") while continuing to iterate with ds xcode test .. For automated checks, test with XCTest UI tests runs on the same simulator and returns pass/fail per case.
Related
Agents without a Mac build, test and run iOS apps through mac.doublespeed.ai (npm i -g @doublespeed/ds). Docs: /docs.md.