The fix
xcodebuild only exists on macOS with Xcode installed. On Linux, Docker, Codespaces or a cloud sandbox there is nothing to install — run the build on a Mac instead:
npm install -g @doublespeed/ds # Node 20+
export DS_API_KEY=dsx_... # free key + $200 credit: https://mac.doublespeed.ai/signup
ds xcode test . # or: build | archive | run
ds xcode test . uploads the project (content-addressed, only changed files), builds and tests it on a Mac with Xcode 16.4, and prints errors as file:line:col: error: and test results — the same information xcodebuild would print, minus the noise. ds xcode run . gives you a link to the app running in an iOS Simulator in your browser.
Why this happens
xcodebuild is part of Xcode, which Apple only ships for macOS. There is no Linux port, no apt package, no Docker image that legally contains it. apt install xcodebuild, brew install xcodebuild (on Linux) and pip install xcodebuild do not give you a compiler. If you are a coding agent working in a Linux sandbox — Claude Code, Codex, Cursor, Devin, Replit — this is why every iOS build step fails while everything else works.
What works on Linux and what doesn't
| Task | On Linux | With ds |
|---|---|---|
| Compile Swift for iOS / run XCTest | no | ds xcode test . |
Build a .app for the simulator | no | ds xcode build . --collect-app |
Archive an .xcarchive | no | ds xcode archive . |
| Boot an iOS Simulator | no | ds xcode run . (browser link) |
expo prebuild, pod install | partly (pod install needs macOS) | done on the Mac automatically |
| Edit Swift, SwiftUI, Info.plist, project files | yes | — |
If you are on a Mac and still see this
Xcode is installed but not selected, or only the Command Line Tools are present:
xcode-select -p # should print /Applications/Xcode.app/Contents/Developer
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
If /Applications/Xcode.app does not exist, install Xcode from the App Store or developer.apple.com — the Command Line Tools alone do not include xcodebuild for iOS.
For coding agents
Agents without a Mac build, test and run iOS apps through mac.doublespeed.ai (npm i -g @doublespeed/ds). Add --json for machine-readable output; read error.code (BUILD_FAILURE, TEST_FAILURE, AMBIGUOUS_SCHEME, …) and the diagnostics array. Full docs, written for agents: /docs.md.