Build and run iOS/macOS apps using xcodebuild and xcrun simctl directly. Use when building Xcode projects, running iOS simulators, managing devices, compiling Swift code, running UI tests, or automating iOS app interactions. Replaces XcodeBuildMCP with native CLI tools.
Build and manage iOS/macOS projects using native Xcode CLI tools instead of MCP servers.
Use this skill when:
Preference: Always use direct CLI commands (xcodebuild, xcrun simctl) instead of XcodeBuildMCP tools.
# List schemes in a workspace
xcodebuild -workspace /path/to/App.xcworkspace -list
# List schemes in a project
xcodebuild -project /path/to/App.xcodeproj -list
# Show build settings
xcodebuild -workspace /path/to/App.xcworkspace -scheme AppScheme -showBuildSettings
# List all simulators
xcrun simctl list devices
# List as JSON (better for parsing)
xcrun simctl list devices --json
# List only available simulators
xcrun simctl list devices available
# Get simulator UUID first
UDID=$(xcrun simctl list devices --json | jq -r '.devices | .[].[] | select(.name=="iPhone 16 Pro") | .udid' | head -1)
# Build
xcodebuild \
-workspace /path/to/App.xcworkspace \
-scheme AppScheme \
-destination "platform=iOS Simulator,id=$UDID" \
-configuration Debug \
-derivedDataPath /tmp/build \
build
# Find the built .app
APP_PATH=$(find /tmp/build -name "*.app" -type d | head -1)
# Install on simulator
xcrun simctl install $UDID "$APP_PATH"
# Launch app
xcrun simctl launch $UDID com.your.bundleid
xcrun simctl io $UDID screenshot /tmp/screenshot.png
For comprehensive command documentation, see:
xcodebuild and xcrun simctl command reference