Skip to main content
Glama

build_ios_sim_name_proj

Builds an iOS app from a project file for a specific simulator by name. Requires project path, scheme, and simulator name parameters.

Instructions

Builds an iOS app from a project file for a specific simulator by name. IMPORTANT: Requires projectPath, scheme, and simulatorName. Example: build_ios_sim_name_proj({ projectPath: '/path/to/MyProject.xcodeproj', scheme: 'MyScheme', simulatorName: 'iPhone 16' })

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesPath to the .xcodeproj file (Required)
schemeYesThe scheme to use (Required)
simulatorNameYesName of the simulator to use (e.g., 'iPhone 16') (Required)
configurationNoBuild configuration (Debug, Release, etc.)
derivedDataPathNoPath where build products and other derived data will go
extraArgsNoAdditional xcodebuild arguments
useLatestOSNoWhether to use the latest OS version for the named simulator
preferXcodebuildNoIf true, prefers xcodebuild over the experimental incremental build system, useful for when incremental build system fails.

Implementation Reference

  • Core handler function implementing the build logic for iOS simulator apps from project files. Validates parameters and executes the xcodebuild build command with simulator targeting.
    /** * Internal logic for building iOS Simulator apps. */ async function _handleIOSSimulatorBuildLogic(params: { workspacePath?: string; projectPath?: string; scheme: string; configuration: string; simulatorName?: string; simulatorId?: string; useLatestOS: boolean; derivedDataPath?: string; extraArgs?: string[]; preferXcodebuild?: boolean; }): Promise<ToolResponse> { log('info', `Starting iOS Simulator build for scheme ${params.scheme} (internal)`); return executeXcodeBuildCommand( { ...params, }, { platform: XcodePlatform.iOSSimulator, simulatorName: params.simulatorName, simulatorId: params.simulatorId, useLatestOS: params.useLatestOS, logPrefix: 'iOS Simulator Build', }, params.preferXcodebuild, 'build', ); }
  • Zod schema defining input parameters for the build_ios_sim_name_proj tool, using shared common schemas.
    { projectPath: projectPathSchema, scheme: schemeSchema, simulatorName: simulatorNameSchema, configuration: configurationSchema, derivedDataPath: derivedDataPathSchema, extraArgs: extraArgsSchema, useLatestOS: useLatestOSSchema, preferXcodebuild: preferXcodebuildSchema, },
  • Tool registration call that defines the name, description, schema, and handler for 'build_ios_sim_name_proj' using the registerTool utility.
    registerTool<Params>( server, 'build_ios_sim_name_proj', "Builds an iOS app from a project file for a specific simulator by name. IMPORTANT: Requires projectPath, scheme, and simulatorName. Example: build_ios_sim_name_proj({ projectPath: '/path/to/MyProject.xcodeproj', scheme: 'MyScheme', simulatorName: 'iPhone 16' })", { projectPath: projectPathSchema, scheme: schemeSchema, simulatorName: simulatorNameSchema, configuration: configurationSchema, derivedDataPath: derivedDataPathSchema, extraArgs: extraArgsSchema, useLatestOS: useLatestOSSchema, preferXcodebuild: preferXcodebuildSchema, }, async (params: Params) => { // Validate required parameters const projectValidation = validateRequiredParam('projectPath', params.projectPath); if (!projectValidation.isValid) return projectValidation.errorResponse!; const schemeValidation = validateRequiredParam('scheme', params.scheme); if (!schemeValidation.isValid) return schemeValidation.errorResponse!; const simulatorNameValidation = validateRequiredParam('simulatorName', params.simulatorName); if (!simulatorNameValidation.isValid) return simulatorNameValidation.errorResponse!; // Provide defaults return _handleIOSSimulatorBuildLogic({ ...params, configuration: params.configuration ?? 'Debug', useLatestOS: params.useLatestOS ?? true, preferXcodebuild: params.preferXcodebuild ?? false, }); }, );
  • Top-level registration entry that invokes the module-specific registration function during server tool setup, conditionally based on environment variable.
    { register: registerIOSSimulatorBuildByNameProjectTool, groups: [ToolGroup.IOS_SIMULATOR_WORKFLOW], envVar: 'XCODEBUILDMCP_TOOL_IOS_SIMULATOR_BUILD_BY_NAME_PROJECT', },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SampsonKY/XcodeBuildMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server