core-data
Installation
SKILL.md
Core Data
Build and maintain data persistence using Core Data for apps that have not adopted SwiftData. Covers stack setup, concurrency, batch operations, NSFetchedResultsController, persistent history tracking, staged migration, and testing.
Contents
- Stack Setup & Concurrency
- NSFetchedResultsController
- Batch Operations
- Persistent History Tracking
- Staged Migration & Coexistence
- Testing
- Common Mistakes
- Review Checklist
- References
Stack Setup & Concurrency
Core Data contexts are bound to queues: viewContext runs on the main queue, while background tasks use newBackgroundContext().