Terminal
Terminal/Skill
Installs Xcode tooling and builds, runs, and deploys an iOS app to a simulator or device.
By Builder.io
Works with
npx skills add builderio/builder-agent-skills --skill ios-nativeIf the user uses /ios-native install, follow references/install.md.
Use xcodebuild to build the app. First, identify the scheme and workspace/project:
# List available schemes
xcodebuild -list
Build for simulator:
xcodebuild -scheme <SchemeName> -sdk iphonesimulator -configuration Debug -derivedDataPath build build
List available simulators:
xcrun simctl list devices available
If there is more than one option, ask the user which one to use. Open DeviceHub first, falling back to Simulator.app if it cannot open:
open -a DeviceHub || open -a Simulator
Build the app, boot the selected simulator if needed, then install and launch it with simctl:
xcodebuild -scheme <SchemeName> -sdk iphonesimulator -configuration Debug -derivedDataPath build build
xcrun simctl boot <SimulatorUDID>
xcrun simctl bootstatus <SimulatorUDID> -b
xcrun simctl install <SimulatorUDID> build/Build/Products/Debug-iphonesimulator/<AppName>.app
xcrun simctl launch <SimulatorUDID> <BundleIdentifier>
Skip simctl boot when the selected simulator is already booted. Read <BundleIdentifier> from the built app's Info.plist rather than guessing it.
Use xcodebuild with -sdk iphoneos and deploy via xcrun:
xcodebuild -scheme <SchemeName> -sdk iphoneos -configuration Debug -derivedDataPath build build
xcrun devicectl device install app --device <DeviceUDID> build/Build/Products/Debug-iphoneos/<AppName>.app
After a successful build, the .app bundle is located at:
build/Build/Products/Debug-iphonesimulator/<AppName>.app # simulator
build/Build/Products/Debug-iphoneos/<AppName>.app # device
xcodebuild -list first to get the correct scheme name — do not guess it..xcworkspace (e.g. CocoaPods), pass -workspace <Name>.xcworkspace instead of -project.xcrun simctl list devices available to get the exact simulator UDID; native-run may fail when Simulator.app is absent even if DeviceHub opens.Always write commands on a single line — no backslash line continuations. The command ACL uses glob patterns without dotAll, so embedded newlines break matching for commands like xcodebuild *. For long output, pipe to tail/head or write to a file.