SwiftData, announced at WWDC 2023, is a framework that lets developers use Swift-like API to handle persistence in their apps. It lets you save data to the local device and then to retrieve, update and delete that data! In this SwiftData basics video, you’ll learn:
In this video, you’ll learn:
How to set up their Xcode 15 project to use SwiftData
How to add data, retrieve data, update data and delete data using SwiftData
How SwiftData is different from the CoreData framework
There are 5 steps involved:
00:00 Introduction
01:24 Step 1: Create the model
04:24 Step 2: Create modelContainer
05:15 Step 3: Environment object for the context
06:08 Step 4: Add objects and Query to get the data
09:37 Step 5: Update objects, remove objects from or save the context
This video is based on our SwiftData article here:
To get access to all of our courses, visit our website: