iOS Build Expert
Complete iOS build system expertise for Leavn app.
Quick Commands
make clean # Clean build make sim-build # Build for simulator make test # Run tests xcrun simctl list # List simulators
Build Error Workflow
-
Run build, capture output: make sim-build 2>&1 | tee /tmp/build.log
-
Categorize errors: type errors, missing imports, actor isolation, etc.
-
Fix in dependency order (imports → types → logic)
-
Rebuild and verify
Simulator Issues
-
Reset: xcrun simctl erase all
-
Boot specific: xcrun simctl boot "iPhone 15 Pro"
-
Install app: xcrun simctl install booted path/to/app
-
Launch: xcrun simctl launch booted bundle.id
Common Fixes
-
Missing module: Check Package.swift dependencies
-
Actor isolation: Add @MainActor or nonisolated
-
Type mismatch: Check @Observable vs @Published patterns
-
Build settings: Verify project.yml / xcodegen
Visual Debugging
-
Screenshot: xcrun simctl io booted screenshot /tmp/screen.png
-
Record: xcrun simctl io booted recordVideo /tmp/video.mov
Use when: Build failures, simulator issues, Xcode errors, diagnostics