Loading...
Loading...
Build, test, and manage Xcode projects and Swift packages. Use when the user mentions Xcode, iOS/macOS app development, simulators, Swift packages, or needs to build/test Apple platform apps. Triggers on "build", "run", "test", "simulator", "xcodebuild", "swift package", "iOS app", "macOS app".
npx skill4agent add bjesuiter/skills xcodebunx mcporter call --stdio "xcodebuildmcp" <tool_name> [args...]mcporterxcodebuildmcpbunxbunx mcporter call --stdio "xcodebuildmcp" session-set-defaults \
projectPath="/path/to/Project.xcodeproj" \
scheme="MyApp" \
simulatorName="iPhone 16"bunx mcporter call --stdio "xcodebuildmcp" session-set-defaults \
workspacePath="/path/to/Project.xcworkspace" \
scheme="MyApp" \
simulatorId="DEVICE_UDID"bunx mcporter call --stdio "xcodebuildmcp" session-show-defaultsbunx mcporter call --stdio "xcodebuildmcp" session-clear-defaults all=truebunx mcporter call --stdio "xcodebuildmcp" discover_projs workspaceRoot="$(pwd)"bunx mcporter call --stdio "xcodebuildmcp" list_schemesbunx mcporter call --stdio "xcodebuildmcp" doctorbunx mcporter call --stdio "xcodebuildmcp" list_simsbunx mcporter call --stdio "xcodebuildmcp" boot_simbunx mcporter call --stdio "xcodebuildmcp" open_simbunx mcporter call --stdio "xcodebuildmcp" build_simbunx mcporter call --stdio "xcodebuildmcp" build_run_simbunx mcporter call --stdio "xcodebuildmcp" test_simbunx mcporter call --stdio "xcodebuildmcp" get_sim_app_path platform="iOS Simulator"bunx mcporter call --stdio "xcodebuildmcp" install_app_sim appPath="/path/to/App.app"bunx mcporter call --stdio "xcodebuildmcp" launch_app_sim bundleId="com.example.MyApp"bunx mcporter call --stdio "xcodebuildmcp" stop_app_sim bundleId="com.example.MyApp"bunx mcporter call --stdio "xcodebuildmcp" screenshotbunx mcporter call --stdio "xcodebuildmcp" describe_ui# Tap by coordinates (use describe_ui first to get coordinates)
bunx mcporter call --stdio "xcodebuildmcp" tap x=100 y=200
# Tap by accessibility ID
bunx mcporter call --stdio "xcodebuildmcp" tap id="myButton"
# Tap by label
bunx mcporter call --stdio "xcodebuildmcp" tap label="Submit"bunx mcporter call --stdio "xcodebuildmcp" long_press x=100 y=200 duration=1000bunx mcporter call --stdio "xcodebuildmcp" swipe x1=100 y1=400 x2=100 y2=100bunx mcporter call --stdio "xcodebuildmcp" gesture preset="scroll-down"
# Presets: scroll-up, scroll-down, scroll-left, scroll-right,
# swipe-from-left-edge, swipe-from-right-edge,
# swipe-from-top-edge, swipe-from-bottom-edgebunx mcporter call --stdio "xcodebuildmcp" type_text text="Hello World"bunx mcporter call --stdio "xcodebuildmcp" button buttonType="home"
# Types: apple-pay, home, lock, side-button, siribunx mcporter call --stdio "xcodebuildmcp" key_press keyCode=40 # Return key
# Common: 40=Return, 42=Backspace, 43=Tab, 44=Spacebunx mcporter call --stdio "xcodebuildmcp" set_sim_appearance mode="dark"bunx mcporter call --stdio "xcodebuildmcp" set_sim_location latitude=37.7749 longitude=-122.4194bunx mcporter call --stdio "xcodebuildmcp" reset_sim_locationbunx mcporter call --stdio "xcodebuildmcp" sim_statusbar dataNetwork="5g"
# Options: clear, hide, wifi, 3g, 4g, lte, lte-a, lte+, 5g, 5g+, 5g-uwb, 5g-ucbunx mcporter call --stdio "xcodebuildmcp" erase_sims shutdownFirst=truebunx mcporter call --stdio "xcodebuildmcp" start_sim_log_cap bundleId="com.example.MyApp"
# Returns a logSessionIdbunx mcporter call --stdio "xcodebuildmcp" stop_sim_log_cap logSessionId="SESSION_ID"bunx mcporter call --stdio "xcodebuildmcp" record_sim_video start=truebunx mcporter call --stdio "xcodebuildmcp" record_sim_video stop=true outputFile="/path/to/output.mp4"bunx mcporter call --stdio "xcodebuildmcp" list_devicesbunx mcporter call --stdio "xcodebuildmcp" build_devicebunx mcporter call --stdio "xcodebuildmcp" test_devicebunx mcporter call --stdio "xcodebuildmcp" install_app_device appPath="/path/to/App.app"bunx mcporter call --stdio "xcodebuildmcp" launch_app_device bundleId="com.example.MyApp"bunx mcporter call --stdio "xcodebuildmcp" stop_app_device processId=12345# Start
bunx mcporter call --stdio "xcodebuildmcp" start_device_log_cap bundleId="com.example.MyApp"
# Stop
bunx mcporter call --stdio "xcodebuildmcp" stop_device_log_cap logSessionId="SESSION_ID"bunx mcporter call --stdio "xcodebuildmcp" build_macosbunx mcporter call --stdio "xcodebuildmcp" build_run_macosbunx mcporter call --stdio "xcodebuildmcp" test_macosbunx mcporter call --stdio "xcodebuildmcp" get_mac_app_pathbunx mcporter call --stdio "xcodebuildmcp" launch_mac_app appPath="/path/to/App.app"bunx mcporter call --stdio "xcodebuildmcp" stop_mac_app appName="MyApp"bunx mcporter call --stdio "xcodebuildmcp" swift_package_build packagePath="$(pwd)"bunx mcporter call --stdio "xcodebuildmcp" swift_package_test packagePath="$(pwd)"bunx mcporter call --stdio "xcodebuildmcp" swift_package_run packagePath="$(pwd)"bunx mcporter call --stdio "xcodebuildmcp" swift_package_clean packagePath="$(pwd)"bunx mcporter call --stdio "xcodebuildmcp" swift_package_listbunx mcporter call --stdio "xcodebuildmcp" swift_package_stop pid=12345bunx mcporter call --stdio "xcodebuildmcp" scaffold_ios_project \
projectName="MyApp" \
outputPath="$(pwd)" \
bundleIdentifier="com.example.myapp"bunx mcporter call --stdio "xcodebuildmcp" scaffold_macos_project \
projectName="MyMacApp" \
outputPath="$(pwd)" \
bundleIdentifier="com.example.mymacapp"bunx mcporter call --stdio "xcodebuildmcp" cleanbunx mcporter call --stdio "xcodebuildmcp" show_build_settingsbunx mcporter call --stdio "xcodebuildmcp" get_app_bundle_id appPath="/path/to/App.app"# 1. Discover projects
bunx mcporter call --stdio "xcodebuildmcp" discover_projs workspaceRoot="$(pwd)"
# 2. List simulators
bunx mcporter call --stdio "xcodebuildmcp" list_sims
# 3. Set session defaults
bunx mcporter call --stdio "xcodebuildmcp" session-set-defaults \
projectPath="$(pwd)/MyApp.xcodeproj" \
scheme="MyApp" \
simulatorName="iPhone 16"
# 4. Build and run
bunx mcporter call --stdio "xcodebuildmcp" build_run_sim
# 5. Run tests
bunx mcporter call --stdio "xcodebuildmcp" test_sim# 1. Build and launch app
bunx mcporter call --stdio "xcodebuildmcp" build_run_sim
# 2. Get UI hierarchy (ALWAYS do this before interacting)
bunx mcporter call --stdio "xcodebuildmcp" describe_ui
# 3. Take screenshot for visual reference
bunx mcporter call --stdio "xcodebuildmcp" screenshot
# 4. Interact with elements using coordinates from describe_ui
bunx mcporter call --stdio "xcodebuildmcp" tap x=187 y=423
# 5. Type text
bunx mcporter call --stdio "xcodebuildmcp" type_text text="test@example.com"| Error | Cause | Solution |
|---|---|---|
| No project/workspace set | Session defaults not configured | Run |
| Simulator not found | Invalid simulator name | Run |
| Build failed | Code errors or config issues | Check build output, run |
| App not installed | Build didn't complete | Run |
doctor