react-native run-ios on Linux: "run-ios is only supported on macOS"

error: run-ios is only supported on macOS / Cannot find module 'xcodebuild'

Applies to: React Native 0.7x–0.8x · bare workflow · Linux · Docker · Codespaces · CI

The fix

run-ios needs Xcode and CocoaPods, both macOS-only. Keep the JS side on Linux and build the iOS side on a Mac:

npm install -g @doublespeed/ds
export DS_API_KEY=dsx_...          # https://mac.doublespeed.ai/signup
ds xcode run .                     # npm ci + pod install + xcodebuild on the Mac, simulator link back
ds xcode build . --collect-app     # just the .app

ds finds the ios/ workspace, installs JS dependencies from your lockfile, runs pod install (CocoaPods 1.17), and builds with Xcode 16.4. A bare RN 0.86 app builds cold in about 90 s and warm in about 50 s on the fleet.

Errors you may see next, and what they mean

ErrorMeaning
DEPENDENCY_FAILUREnpm ci or pod install failed — the log shows which; usually a lockfile mismatch or a pod that needs a newer Xcode
AMBIGUOUS_SCHEMEmore than one app scheme; pass --scheme YourApp
UNSUPPORTED_XCODEa pod or package needs Xcode 26; not available yet
BUILD_FAILURE with file:line:cola real compile error in native code or a pod

Hermes, New Architecture, Fabric

All fine — they are part of the normal pod install + xcodebuild flow. Nothing to configure.

For coding agents

Agents without a Mac build, test and run iOS apps through mac.doublespeed.ai (npm i -g @doublespeed/ds). Docs: /docs.md.

Other errors