Your First iOS Project
This guide walks you through the full lifecycle of creating, building, and running an iOS app using Xcode Pilot MCP — entirely through natural language prompts.
What You’ll Do
Section titled “What You’ll Do”- Create a new SwiftUI project
- Build the project
- Create and boot a simulator
- Install and launch the app
- Take a screenshot
The Workflow
Section titled “The Workflow”-
Create the project
“Create a new SwiftUI iOS project called WeatherApp in ~/Projects”
This uses
project_createto generate a complete Swift Package with source files, tests, and assets.Created project WeatherApp at /Users/dev/Projects/WeatherApp├── Package.swift├── Sources/WeatherApp/│ ├── WeatherAppApp.swift│ └── ContentView.swift└── Tests/WeatherAppTests/ -
Check available schemes
“List the schemes in ~/Projects/WeatherApp”
This uses
xcode_listto discover what’s available.Schemes:WeatherApp -
Build for simulator
“Build WeatherApp for iPhone 16 simulator”
This uses
xcode_buildwith the correct scheme and destination.{"scheme": "WeatherApp","projectPath": "/Users/dev/Projects/WeatherApp","destination": "platform=iOS Simulator,name=iPhone 16,OS=latest"}** BUILD SUCCEEDED ** -
Find or create a simulator
“List my booted simulators”
If none are running:
“Boot the iPhone 16 simulator”
This uses
simulator_listandsimulator_boot. -
Open the Simulator app
“Open the Simulator app for my iPhone 16”
Uses
simulator_opento bring up the visual simulator window. -
Install the app
“Install the built WeatherApp on the iPhone 16 simulator”
Uses
app_installwith the .app path from the build output in DerivedData.App installed successfully on F3A1B2C3-D4E5-6789-ABCD-EF0123456789 -
Launch the app
“Launch com.example.WeatherApp on the iPhone 16 simulator”
Uses
app_launchto start the app.App launched: com.example.WeatherApp (PID: 12345) -
Take a screenshot
“Take a screenshot of the iPhone 16 simulator”
Uses
screenshotto capture the current screen state.Screenshot saved to /tmp/screenshot-20250223-143052.png
The One-Shot Version
Section titled “The One-Shot Version”Experienced users can combine multiple steps in a single prompt:
“Create a new SwiftUI iOS project called WeatherApp in ~/Projects, build it for iPhone 16 simulator, boot the simulator, install the app, launch it, and take a screenshot”
The AI assistant will execute all 6+ tool calls in sequence, handling paths and device IDs automatically.
Common Variations
Section titled “Common Variations”“Create a new UIKit iOS project called WeatherApp in ~/Projects”
{ "name": "WeatherApp", "template": "uikit", "platform": "ios", "outputPath": "/Users/dev/Projects"}“Create a new SwiftUI macOS project called WeatherApp in ~/Projects”
{ "name": "WeatherApp", "template": "swiftui", "platform": "macos", "outputPath": "/Users/dev/Projects"}“Create a new multiplatform SwiftUI project called WeatherApp in ~/Projects”
{ "name": "WeatherApp", "template": "swiftui", "platform": "multiplatform", "outputPath": "/Users/dev/Projects"}Next Steps
Section titled “Next Steps”- Debugging Workflow — Learn to capture logs, record screens, and audit accessibility
- Simulator Management — Create and manage multiple simulators for testing
- Prompt Cookbook — Ready-to-use prompts for every scenario