Build and archive with Xcode
build_and_archiveBuild and archive an Xcode project into a signed .ipa using a scheme and ExportOptions.plist, with optional pre-build command for generated projects.
Instructions
Build, archive, and export a signed .ipa via xcodebuild (requires Xcode on this Mac). Needs a scheme and an ExportOptions.plist. Projects generated by xcodegen or tuist must be generated first: pass pre_build_command. Returns the .ipa this export produced. Pro feature.
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": {
"project_path": "<project_path>",
"scheme": "<scheme>",
"export_options_plist": "<export_options_plist>"
},
"name": "build_and_archive"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scheme | Yes | Xcode scheme to build | |
| workspace | No | Set true if project_path is a .xcworkspace | |
| output_dir | No | Output directory (default ./build). Each export goes into its own export-<timestamp> folder inside it. | |
| project_path | Yes | Path to .xcodeproj or .xcworkspace | |
| configuration | No | Build configuration (default Release) | |
| pre_build_command | No | Command to run first in the project's folder, as an argument array without a shell, e.g. ["xcodegen","generate"] or ["tuist","generate","--no-open"]. Required for generated projects. | |
| export_options_plist | Yes | Path to ExportOptions.plist (method app-store-connect) |