23
Getting Started with SwiftData
During Apple’s World Wide Developer Conference in 2023, they introduced SwiftData, an all-new framework to save app data. Previously, developers had to use an editor to create data models, but SwiftData allows developers to describe data models and manipulate model instances using regular Swift code. Features such as relationship management, undo/redo support, iCloud synchronization, and more are provided automatically.
In this chapter, you’re going to modify the JRNL app that you completed in Chapter 16, Passing Data between View Controllers, to save journal entries using SwiftData. This means that when you add new journal entries to the app, they will reappear the next time the app is launched.
First, you’ll ...
Get iOS 17 Programming for Beginners - Eighth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.