xcodebuild-build
Builds Xcode projects and workspaces with intelligent defaults that remember successful configurations and suggest optimal simulators, while tracking performance metrics and providing structured error messages.
Instructions
xcodebuild-build
⚡ Build Xcode projects with intelligent defaults and performance tracking
What it does
Builds Xcode projects and workspaces with advanced learning capabilities that remember successful configurations and suggest optimal simulators per project. Uses progressive disclosure to provide concise summaries by default, with full build logs available on demand. Tracks build performance metrics (duration, errors, warnings) and learns from successful builds to improve future build suggestions.
Why you'd use it
Automatic smart defaults: remembers which simulator and config worked last time
Progressive disclosure: concise summaries prevent token overflow, full logs on demand
Performance tracking: measures build times and provides optimization insights
Structured errors: clear error messages instead of raw CLI stderr
Parameters
Required
projectPath (string): Path to .xcodeproj or .xcworkspace file
scheme (string): Build scheme name (use xcodebuild-list to discover)
Optional
configuration (string, default: 'Debug'): Build configuration (Debug/Release, defaults to cached or "Debug")
destination (string): Build destination (e.g., "platform=iOS Simulator,id=")
sdk (string): SDK to build against (e.g., "iphonesimulator", "iphoneos")
derivedDataPath (string): Custom derived data path for build artifacts
Returns
Structured JSON response with buildId (for progressive disclosure), success status, build summary (errors, warnings, duration), and intelligence metadata showing which smart defaults were applied. Use xcodebuild-get-details with buildId to retrieve full logs.
Examples
Minimal build with smart defaults
const result = await xcodebuildBuildTool({
projectPath: "/path/to/MyApp.xcodeproj",
scheme: "MyApp"
});Explicit configuration
const release = await xcodebuildBuildTool({
projectPath: "/path/to/MyApp.xcworkspace",
scheme: "MyApp",
configuration: "Release",
destination: "platform=iOS Simulator,id=ABC-123"
});Related Tools
xcodebuild-test: Run tests after building
xcodebuild-clean: Clean build artifacts
xcodebuild-get-details: Get full build logs (use with buildId)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | ||
| scheme | Yes | ||
| configuration | No | Debug | |
| destination | No | ||
| sdk | No | ||
| derivedDataPath | No |