Build & Run (Workflow)
workflow-build-and-runBuild and run an Xcode project on a simulator in one workflow: select or auto-detect a device, compile, boot, install, and launch the app, with optional screenshot capture.
Instructions
workflow-build-and-run
Build and run an Xcode project on a simulator in a single orchestrated workflow.
Overview
Combines simulator selection, build, installation, and launch into one call:
Select Simulator - Use the specified device, or pick one at or above the scheme's deployment target
Build - Compile the Xcode project with xcodebuild for that device
Boot - Start the simulator
Install - Install the built .app bundle
Launch - Launch the app
Screenshot (optional) - Capture initial app state
Parameters
Required
projectPath (string): Path to .xcodeproj or .xcworkspace
scheme (string): Build scheme name
Optional
configuration (string): Build configuration (default: "Debug")
simulatorUdid (string): Target simulator UDID - auto-detected if omitted
launchArguments (string[]): App launch arguments
environmentVariables (Record<string, string>): App environment variables
takeScreenshot (boolean): Capture screenshot after launch (default: false)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectPath": "<projectPath>",
"scheme": "<scheme>"
},
"name": "workflow-build-and-run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scheme | Yes | Build scheme name | |
| projectPath | Yes | Path to .xcodeproj or .xcworkspace | |
| configuration | No | Build configuration (default: "Debug") | |
| simulatorUdid | No | Target simulator UDID - auto-detected if omitted | |
| takeScreenshot | No | Capture screenshot after launch | |
| launchArguments | No | App launch arguments | |
| environmentVariables | No | App environment variables |