Build, install, and launch iOS apps on simulator. Use when asked to "build and install", "deploy to simulator", "run on simulator", "install app", "launch app on simulator", or any variation of building an Xcode project and running it on iOS Simulator.
Build an Xcode project and deploy to iOS Simulator.
mcp_xcode_XcodeListWindows
Extract tabIdentifier from the response (e.g., windowtab2).
mcp_xcode_BuildProject with tabIdentifier
Wait for successful build.
find ~/Library/Developer/Xcode/DerivedData -name "AppName.app" -path "*Debug-iphonesimulator*" 2>/dev/null
Use the path from (NOT ).
Build/Products/Debug-iphonesimulator/Index.noindex/Build/Products/xcrun simctl list devices | grep -i "device name"
Extract the UUID (e.g., F574B0CD-C866-483C-BB1B-1B85E2B7BAE0).
xcrun simctl install <SIMULATOR_UUID> "<PATH_TO_APP>"
Get bundle identifier from Info.plist if unknown:
plutil -p "<PATH_TO_APP>/Info.plist" | grep -i bundleidentifier
Launch the app:
xcrun simctl launch <SIMULATOR_UUID> <BUNDLE_ID>
After initial setup, combine install and launch:
xcrun simctl install <UUID> "<APP_PATH>" && xcrun simctl launch <UUID> <BUNDLE_ID>
mcp_xcode_BuildProject instead of xcodebuild CLI for building.app path is in Build/Products/, not Index.noindex/Build/Products/xcrun simctl boot <UUID>