SwiftData Basics in 15 minutes

SwiftData Basics in 15 minutes

62.770 Lượt nghe
SwiftData Basics in 15 minutes
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://cwc.to/youtubeoffer 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