SwiftUI Data & ArchitectureLesson 55Free preview
Persistence (Core Data)
This lesson is part of Swift · All levels
Summary
This lesson reviews Core Data (and its modern successor SwiftData) which is a persistent object-based graphics management framework developed by Apple. Core Data is capable of handling relationships between complex data tables, indexed searches with NSPredicate, undo/redo tracking, and pagination of dataset thousands of rows with minimal RAM consumption.
Key points
- Core Data is a framework for the management of object graphics and relational data persistence.
- Using NSManagedObjectContext as a workspace for data transactions in memory
- NSPersistentContainer coordinates SQLite databases that become the storage backend on the disk
- NSPredicate is used to filter data queries and NSSortDescriptor for sequencing
- The property wrapper '@FetchRequest' integrates the Core Data query directly into the SwiftUI
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.