iOS Build Doctor Skill
Purpose
Diagnose and automatically fix iOS build issues. This skill analyzes Xcode build logs, identifies common errors, and applies fixes to get projects building successfully.
Capabilities
- •Parse and analyze Xcode build logs
- •Fix "cannot find type in scope" errors
- •Resolve module import issues
- •Clean derived data and caches
- •Fix Info.plist configuration issues
- •Update build settings automatically
- •Generate detailed diagnostic reports
Usage
When encountering build errors, I will:
- •Capture build output from xcodebuild or Xcode
- •Analyze error patterns to identify root causes
- •Apply automated fixes for known issues
- •Clean caches if necessary
- •Verify fixes with a test build
- •Generate report of actions taken
Common Tasks
Diagnose build failure
python
python build_analyzer.py --log build.log --project YourApp.xcodeproj
Fix scope errors
python
python scope_fixer.py --project YourApp.xcodeproj --error "Cannot find type 'AppState' in scope"
Clean and rebuild
bash
./clean_build.sh YourApp.xcodeproj
Resources
- •
build_analyzer.py- Parse and analyze build logs - •
scope_fixer.py- Fix import and scope issues - •
clean_build.sh- Deep clean build artifacts - •
diagnostics.json- Common error patterns and fixes - •
build_settings_fixer.py- Update project build settings
Error Patterns Handled
Scope Errors
- •"Cannot find type in scope"
- •"Use of unresolved identifier"
- •"No such module"
Build Configuration
- •Module not enabled
- •Swift version mismatches
- •Target membership issues
File System
- •Missing file references
- •Incorrect paths
- •Derived data corruption
Signing & Capabilities
- •Provisioning profile issues
- •Entitlements mismatches
- •Bundle identifier conflicts
Diagnostic Process
- •Parse error messages
- •Identify error category
- •Check diagnostics database
- •Apply relevant fixes
- •Verify resolution
- •Document actions taken
Best Practices
- •Always backup before applying fixes
- •Start with least invasive fixes
- •Clean incrementally (not nuclear option first)
- •Verify each fix before proceeding
- •Document unusual fixes for future reference