Introducing SwiftData
SwiftData is Apple’s all-new framework for saving app data to your device. It automatically provides relationship management, undo/redo support, iCloud synchronization, and more. You can model your data using regular Swift types, and SwiftData will then build a custom schema using your specified model and map its fields to device storage. You can query and filter your data using expressions that are type-checked by the compiler, resulting in fewer typos or mistakes.
You can learn more about SwiftData at https://developer.apple.com/documentation/swiftdata.
During WWDC 2024, Apple added new APIs to SwiftData. These enable you to model indices and compound unique constraints using macros, build custom data stores using your own document format, keep track of transaction history, and more.
You can learn more about what’s new in SwiftData at https://developer.apple.com/videos/play/wwdc2024/10137/.
Several steps...