Verify AI-generated iOS code actually builds and runs on a simulator
Когда использовать: Claude just wrote or edited SwiftUI views. Before saying 'done', you want to compile, run on simulator, and screenshot.
Предварительные требования
- Xcode installed — Xcode 15+ from the Mac App Store; confirm with
xcodebuild -version - A bootable simulator — Xcode → Settings → Platforms → iOS Simulator downloaded
Поток
-
Discover the project and buildFind the Xcode project in /Users/me/Projects/MyApp. Build scheme 'MyApp' for iOS Simulator destination 'iPhone 16'. Report any errors or warnings.✓ Скопировано→ Build succeeds, or specific errors with file:line
-
Boot simulator, install, launchBoot an iPhone 16 simulator if not already booted. Install the built app and launch it. Take a screenshot after 3 seconds.✓ Скопировано→ App running; screenshot captured
-
Drive the featureTap the 'Sign Up' button, type '[email protected]' in the email field, tap Submit. Screenshot after each step.✓ Скопировано→ Sequence of screenshots showing the flow; or a clear tap-failed error
Итог: Before/after screenshots that prove the feature works, committed alongside the code.
Подводные камни
- Tapping by coordinate is fragile across device sizes — Prefer accessibility-label based taps when the MCP supports them; use coordinates only as fallback
- Simulator build uses a different architecture than a real device — For architecture-sensitive code, also build for a physical device at least once before merging