What problem does it solve?
This Skill unit streamlines the process of building, reviewing, and improving Core Data persistence in iOS apps, eliminating the complexities of NSManagedObject subclasses, NSFetchedResultsController, and other related features.
Core Features & Use Cases
- Stack Setup: Provides a comprehensive guide for initializing and managing the Core Data stack using
NSPersistentContainer.
- Concurrency and Threading: Integrates Swift Concurrency with Core Data for efficient background operations.
- NSFetchedResultsController: Offers detailed instructions on using
NSFetchedResultsController for list-driven UIs.
- Batch Operations: Explains how to perform bulk operations using
NSBatchInsertRequest, NSBatchDeleteRequest, and NSBatchUpdateRequest.
- Persistent History Tracking: Guides on enabling and utilizing persistent history tracking for store-level changes.
- Staged Migration: Describes how to perform staged schema migrations with
NSStagedMigrationManager.
- Composite Attributes: Covers the implementation of composite attributes on entities.
- SwiftData Boundary: Provides guidance for Core Data + SwiftData coexistence and migration.
- Testing: Offers insights into testing Core Data with in-memory stores.
- Common Mistakes: Lists and explains common mistakes in Core Data usage to avoid in production.
- Review Checklist: A comprehensive checklist for reviewing Core Data implementations.
Quick Start
Use the core-data skill to review the Core Data stack configuration in your app by running 'core-data review-stack'.