
NO XCODE BUILDING.
xcodebuild has always been able to build for a device from the terminal. The part that used to send people back to the GUI was getting the build onto the phone. Xcode 15 shipped xcrun devicectl, Apple's CLI for talking to a paired device.
START HERE.
- iPhone has been opened in Xcode at least once, with automatic signing on.
- Developer Mode is on: Settings → Privacy & Security → Developer Mode
- The phone is connected (USB) and unlocked
FIND. LOCATE YOUR DEVICE
bash
xcrun devicectl list devicesBUILD. CONNECT YOUR APP
bash
xcodebuild -project YourApp.xcodeproj -scheme YourScheme \
-destination 'platform=iOS,name=Your iPhone Name' \
-configuration Debug buildUse the device's name (as shown by devicectl) or its identifier — both work as a -destination. Automatic signing handles the rest as long as Xcode has provisioned that device before.
CONFIRM. Find the built .app
bash
xcodebuild -project YourApp.xcodeproj -scheme YourScheme \
-destination 'platform=iOS,name=Your iPhone Name' \
-showBuildSettings 2>/dev/null | grep -E "TARGET_BUILD_DIR|FULL_PRODUCT_NAME"INSTALL.
bash
xcrun devicectl device install app --device <device-id> /path/to/YourApp.appLAUNCH.
bash
xcrun devicectl device process launch --device <device-id> com.yourcompany.yourappWHY?
- Scalable use it for WORKFLOW, a git hook, or an agent that builds and installs on save
- Performant No GUI focus-stealing while you work in the terminal or another window
- Same commands work headless, over SSH, or from CI runners with a device attached
If three commands feels like two too many, ios-deploy (brew install ios-deploy) wraps build-install-launch-and-stream-logs into one call. devicectl is the Apple-supported path and doesn't need a third-party tool, so it's the one worth learning first.
“The GUI is a convenience, not a requirement.”
— unparty-app