Skip to main content
Glama

get_build_settings

Retrieve build settings for a specific scheme in an Xcode project by providing the project path, scheme, configuration, and target platform. Simplify development workflows with precise control over project configurations.

Instructions

Get build settings for a specific scheme in an Xcode project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
configurationNoBuild configuration (Debug/Release)
platformNoTarget platform (iOS, macOS, tvOS, watchOS, visionOS)
projectPathYesPath to the Xcode project or workspace
schemeYesXcode scheme to get settings for

Implementation Reference

  • Main helper function that executes xcodebuild -showBuildSettings to retrieve build settings for a given Xcode project/workspace, scheme, configuration, and platform.
    async getBuildSettings( projectPath: string, isWorkspace: boolean, scheme: string, configuration?: string, platform?: Platform ): Promise<any> { const projectFlag = isWorkspace ? '-workspace' : '-project'; let command = `xcodebuild -showBuildSettings ${projectFlag} "${projectPath}"`; command += ` -scheme "${scheme}"`; if (configuration) { command += ` -configuration "${configuration}"`; } if (platform) { // Add a generic destination for the platform to get appropriate settings const { PlatformInfo } = await import('../../features/build/domain/PlatformInfo.js'); const platformInfo = PlatformInfo.fromPlatform(platform); const destination = platformInfo.generateGenericDestination(); command += ` -destination '${destination}'`; } command += ' -json'; logger.debug({ command }, 'Get build settings command'); try { const { stdout } = await execAsync(command, { maxBuffer: 10 * 1024 * 1024 }); const settings = JSON.parse(stdout); logger.debug({ projectPath, scheme }, 'Got build settings'); return settings; } catch (error: any) { logger.error({ error: error.message, projectPath, scheme }, 'Failed to get build settings'); throw new Error(`Failed to get build settings: ${error.message}`); } }
  • Convenience wrapper on XcodeProject class that calls the underlying XcodeInfo.getBuildSettings method.
    async getBuildSettings( scheme: string, configuration?: string, platform?: Platform ): Promise<any> { const isWorkspace = this.type === 'workspace'; return await this.info.getBuildSettings( this.path, isWorkspace, scheme, configuration, platform ); }
  • src/index.ts:99-99 (registration)
    Commented out registration of GetBuildSettingsTool in the main MCP server index file.
    // new GetBuildSettingsTool(),

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/Stefan-Nitu/mcp-xcode'

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