SwiftData Basics in 15 minutes
CodeWithChris CodeWithChris
588K subscribers
34,415 views
0

 Published On Jul 7, 2023

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!

👋 Our "Launch Your First App" program will help you build up your iOS skills to publish your very own feature rich app even if you’re a beginner starting from scratch. https://codewithchris.com/plus

In this SwiftData basics 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:
https://codewithchris.com/swift-data/

To get access to all of our courses, visit our website:
https://codewithchris.com/plus

show more

Share/Embed