axiom-swiftdata-migration-diag
SwiftData Migration Diagnostics
Overview
SwiftData migration failures manifest as production crashes, data loss, corrupted relationships, or simulator-only success. Core principle 90% of migration failures stem from missing models in VersionedSchema, relationship inverse issues, or untested migration paths—not SwiftData bugs.
Red Flags — Suspect SwiftData Migration Issue
If you see ANY of these, suspect a migration configuration problem:
- App crashes on launch after schema change
- "Expected only Arrays for Relationships" error
- "The model used to open the store is incompatible with the one used to create the store"
- "Failed to fulfill faulting for [relationship]"
- Migration works in simulator but crashes on real device
- Data exists before migration, gone after
- Relationships broken after migration (nil where they shouldn't be)
- ❌ FORBIDDEN "SwiftData migrations are broken, we should use Core Data"
- SwiftData handles millions of migrations in production apps
More from megastep/codex-skills
ads-competitor
>
25ads-meta
>
15ads-tiktok
>
10code-reviewer
Use when reviewing pull requests, conducting code quality audits, or identifying security vulnerabilities. Invoke for PR reviews, code quality checks, refactoring suggestions.
9axiom-app-store-submission
Use when preparing ANY app for App Store submission - enforces pre-flight checklist, rejection prevention, privacy compliance, and metadata completeness to prevent common App Store rejections
8axiom-axe-ref
Use when automating iOS Simulator UI interactions beyond simctl capabilities. Reference for AXe CLI covering accessibility-based tapping, gestures, text input, screenshots, video recording, and UI tree inspection.
8