| name | mobiai-ios-build |
| description | Use when building an iOS project, configuring schemes, troubleshooting build failures, or managing dependencies with CocoaPods or SPM. |
| license | MIT |
| compatibility | ["claude-code","cursor","copilot","codex"] |
| platforms | ["ios"] |
iOS Build System
Community contribution welcome! This skill is a skeleton. Help flesh it out with real-world xcodebuild workflows and troubleshooting tips.
Build iOS projects using xcodebuild and manage dependencies with CocoaPods/SPM.
When to Use
- Building the app for testing or deployment
- Troubleshooting build failures
- Managing dependencies (CocoaPods, SPM)
Build Commands
Discover Project Structure
xcodebuild -list
xcodebuild -workspace MyApp.xcworkspace -list
ls *.xcworkspace *.xcodeproj 2>/dev/null
Build for Simulator
xcodebuild build \
-workspace MyApp.xcworkspace \
-scheme MyApp \
-destination 'platform=iOS Simulator,name=iPhone 15 Pro' \
-quiet
xcodebuild build \
-project MyApp.xcodeproj \
-scheme MyApp \
-destination 'platform=iOS Simulator,name=iPhone 15 Pro' \
-quiet
Build for Device
xcodebuild build \
-workspace MyApp.xcworkspace \
-scheme MyApp \
-destination 'generic/platform=iOS' \
CODE_SIGNING_REQUIRED=NO
Run Tests
xcodebuild test \
-workspace MyApp.xcworkspace \
-scheme MyApp \
-destination 'platform=iOS Simulator,name=iPhone 15 Pro' \
-quiet
Clean Build
xcodebuild clean build \
-workspace MyApp.xcworkspace \
-scheme MyApp \
-destination 'platform=iOS Simulator,name=iPhone 15 Pro'
Dependency Management
CocoaPods
pod install
pod update <PodName>
pod outdated
Always open .xcworkspace (not .xcodeproj) after running pod install.
Swift Package Manager
SPM dependencies are defined in the Xcode project or Package.swift.
xcodebuild -resolvePackageDependencies \
-workspace MyApp.xcworkspace \
-scheme MyApp
cat Package.swift
Code Signing
Development (Automatic)
Xcode handles signing automatically in most cases. For CLI builds:
xcodebuild build \
-allowProvisioningUpdates \
-scheme MyApp \
-destination 'generic/platform=iOS'
Skip Signing (for CI or testing)
xcodebuild build \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO \
-scheme MyApp \
-destination 'platform=iOS Simulator,name=iPhone 15 Pro'
Troubleshooting
DerivedData corruption
rm -rf ~/Library/Developer/Xcode/DerivedData
Module not found
pod deintegrate && pod install
rm -rf ~/Library/Caches/org.swift.swiftpm
Swift version mismatch
swift --version
xcrun swift --version
grep SWIFT_VERSION *.xcodeproj/project.pbxproj
Provisioning profile issues
ls ~/Library/MobileDevice/Provisioning\ Profiles/
Want to improve this skill? Add your xcodebuild expertise, CI/CD patterns, and signing workflows via a PR.