build_ios_dev_proj
Builds iOS applications for physical devices from Xcode project files. Specify project path and scheme to generate device-ready builds.
Instructions
Builds an iOS app from a project file for a physical device. IMPORTANT: Requires projectPath and scheme. Example: build_ios_dev_proj({ projectPath: '/path/to/MyProject.xcodeproj', scheme: 'MyScheme' })
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Path to the .xcodeproj file (Required) | |
| scheme | Yes | The scheme to use (Required) | |
| configuration | No | Build configuration (Debug, Release, etc.) | |
| derivedDataPath | No | Path where build products and other derived data will go | |
| extraArgs | No | Additional xcodebuild arguments | |
| preferXcodebuild | No | If true, prefers xcodebuild over the experimental incremental build system, useful for when incremental build system fails. |
Implementation Reference
- src/tools/build_ios_device.ts:90-109 (handler)The handler function that implements the core logic of the 'build_ios_dev_proj' tool. It validates the required 'projectPath' and 'scheme' parameters, sets a default 'Debug' configuration if not provided, and executes the xcodebuild build command for iOS device targeting.async (params: Params) => { const projectValidation = validateRequiredParam('projectPath', params.projectPath); if (!projectValidation.isValid) return projectValidation.errorResponse!; const schemeValidation = validateRequiredParam('scheme', params.scheme); if (!schemeValidation.isValid) return schemeValidation.errorResponse!; return executeXcodeBuildCommand( { ...params, configuration: params.configuration ?? 'Debug', // Default config }, { platform: XcodePlatform.iOS, logPrefix: 'iOS Device Build', }, params.preferXcodebuild, 'build', ); },
- src/tools/build_ios_device.ts:82-89 (schema)The Zod-based input schema object defining the parameters for the 'build_ios_dev_proj' tool, composed of shared schemas from common.ts.{ projectPath: projectPathSchema, scheme: schemeSchema, configuration: configurationSchema, derivedDataPath: derivedDataPathSchema, extraArgs: extraArgsSchema, preferXcodebuild: preferXcodebuildSchema, },
- src/tools/build_ios_device.ts:78-111 (registration)The registerTool call within registerIOSDeviceBuildProjectTool that registers the 'build_ios_dev_proj' tool on the MCP server, specifying name, description, schema, and handler.registerTool<Params>( server, 'build_ios_dev_proj', "Builds an iOS app from a project file for a physical device. IMPORTANT: Requires projectPath and scheme. Example: build_ios_dev_proj({ projectPath: '/path/to/MyProject.xcodeproj', scheme: 'MyScheme' })", { projectPath: projectPathSchema, scheme: schemeSchema, configuration: configurationSchema, derivedDataPath: derivedDataPathSchema, extraArgs: extraArgsSchema, preferXcodebuild: preferXcodebuildSchema, }, async (params: Params) => { const projectValidation = validateRequiredParam('projectPath', params.projectPath); if (!projectValidation.isValid) return projectValidation.errorResponse!; const schemeValidation = validateRequiredParam('scheme', params.scheme); if (!schemeValidation.isValid) return schemeValidation.errorResponse!; return executeXcodeBuildCommand( { ...params, configuration: params.configuration ?? 'Debug', // Default config }, { platform: XcodePlatform.iOS, logPrefix: 'iOS Device Build', }, params.preferXcodebuild, 'build', ); }, ); }
- src/utils/register-tools.ts:258-262 (registration)Top-level registration configuration that includes registerIOSDeviceBuildTools (which registers 'build_ios_dev_proj'), controlled by environment variable and workflow groups.{ register: registerIOSDeviceBuildTools, groups: [ToolGroup.IOS_DEVICE_WORKFLOW], envVar: 'XCODEBUILDMCP_TOOL_IOS_DEVICE_BUILD_TOOLS', },