SwiftData: Simplifying Persistence in iOS Apps

Learn all about SwiftData, a new framework introduced at WWDC 2023 that provides a Swift-like API for working with persistence in iOS apps and simplifies Core Data usage. By Josh Steele.

4.8 (4) · 1 Review

Save for later
Share
You are currently viewing page 2 of 2 of this article. Click here to view the first page.

Just Scratching the Surface

SwiftData has introduced a much simpler way to persist your data in your Swift apps. Thanks to Swift macros, you can instantly make your models, in code, SwiftData ready and configure them to your liking. With a new modifier, you can access the context, and with the new @Query property wrapper, you can easily perform queries. Oh, did I mention that the @Query property wrapper is all set up for Observation, so your user interface stays up to date with the database? There’s a lot packed into a little bit of configurable syntax under the hood. Keep an eye out here at Kodeco for more on one of the biggest changes to come out of WWDC 2023!

Where to Go From Here?

WWDC has a great set of videos to get an introduction to SwiftData:

We hope you enjoyed this quick look at SwiftData, and if you have any questions or comments, please join the forum discussion below!