Using Core Data in a Modern SwiftUI Application
summary
Shows concrete Core Data wiring for SwiftUI: a PersistenceController that creates an in‑memory store for previews, using the @FetchRequest property wrapper for list views, and creating a child managed object context for editable forms so edits stay isolated until saving. Explains how to obtain an editable copy via objectID, persist by saving child then parent, and why managed objects are ObservableObject with NSManaged properties behaving like published bindings.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 3:55Core Data basics
- 14:42Setting up Core Data
- 16:48Apple's Core Data setup
- 20:18Using Core Data in SwiftUI
- 25:15Editing records
- 30:34Managed object contexts
- 36:31Child contexts in practice
- 39:00Abstractions and Core Data
- 40:25Summary and book promotion
related talks
26mEffective Core Data with Swift
28mSwiftUI for UIKit developers
47mIntegrating modern native APIs with legacy code
31mFear not, for the filesystem is with you
36mData flow in SwiftUI - from @State to @Observable...
21mCore Data Custom Store
45mSwiftData as a Replacement for CoreData: Deep Dive
27mA 100% SwiftUI App
