SwiftData Basics: Model, Container, CRUD Operations
Learn SwiftData fundamentals: model, container, fetch, create, update & delete. 🚀 Perfect for beginners!

Sean Allen
103.5K views • Sep 29, 2023

About this video
Go to https://squarespace.com/seanallen to save 10% off your first purchase of a website or domain using code SEANALLEN.
This is an introduction to SwiftData new in iOS 17 and macOS Sonoma. SwiftData was introduced at WWDC 2023 and is the successor to Core Data. SwiftData is a way to persist your app's data locally on device or in iCloud to sync between devices. This video introduces you to the basic concepts like @Model, containers, context, fetch, create, update, and delete.
Need help with something specific? Book a call with me:
https://seanallen.teachable.com/p/call?video=mvXFGikltPc
My iOS Dev Courses:
https://seanallen.teachable.com/?video=mvXFGikltPc
WWDC 2023 -Model your schema with SwiftData:
https://developer.apple.com/videos/play/wwdc2023/10195/
My Formula 1 App:
https://apps.apple.com/app/formula-widgets-push-push/id6744127751
X (Twitter):
Sean Allen - https://twitter.com/seanallen_dev
Hired.com:
https://hired.com/x/1n01g
Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links):
Paul Hudson's Hacking With Swift:
https://gumroad.com/a/762098803
Donny Wals - Combine:
https://gumroad.com/a/909014131
Mark Moeyken’s SwiftUI Books:
www.bigmountainstudio.com/swiftui-views-book/fzc51
Objc.io Books (Thinking in SwiftUI & Advanced Swift):
https://gumroad.com/a/656585843
Timestamps:
0:00 - What is SwiftData?
1:18 - Create Project & Model (@Model)
5:35 - Create & Explain Container (2 ways to do it)
8:42 - Separate Container Object (Configurations)
12:03 - UI Walkthrough
14:29 - Create Expense Items
17:33 - Fetch Expense Items (@Query)
18:39 - Delete Expense Items
20:20 - Update Expense Item
24:52 - Query Predicates (Filter Results)
#swift #softwaredeveloper #iosdeveloper
This is an introduction to SwiftData new in iOS 17 and macOS Sonoma. SwiftData was introduced at WWDC 2023 and is the successor to Core Data. SwiftData is a way to persist your app's data locally on device or in iCloud to sync between devices. This video introduces you to the basic concepts like @Model, containers, context, fetch, create, update, and delete.
Need help with something specific? Book a call with me:
https://seanallen.teachable.com/p/call?video=mvXFGikltPc
My iOS Dev Courses:
https://seanallen.teachable.com/?video=mvXFGikltPc
WWDC 2023 -Model your schema with SwiftData:
https://developer.apple.com/videos/play/wwdc2023/10195/
My Formula 1 App:
https://apps.apple.com/app/formula-widgets-push-push/id6744127751
X (Twitter):
Sean Allen - https://twitter.com/seanallen_dev
Hired.com:
https://hired.com/x/1n01g
Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links):
Paul Hudson's Hacking With Swift:
https://gumroad.com/a/762098803
Donny Wals - Combine:
https://gumroad.com/a/909014131
Mark Moeyken’s SwiftUI Books:
www.bigmountainstudio.com/swiftui-views-book/fzc51
Objc.io Books (Thinking in SwiftUI & Advanced Swift):
https://gumroad.com/a/656585843
Timestamps:
0:00 - What is SwiftData?
1:18 - Create Project & Model (@Model)
5:35 - Create & Explain Container (2 ways to do it)
8:42 - Separate Container Object (Configurations)
12:03 - UI Walkthrough
14:29 - Create Expense Items
17:33 - Fetch Expense Items (@Query)
18:39 - Delete Expense Items
20:20 - Update Expense Item
24:52 - Query Predicates (Filter Results)
#swift #softwaredeveloper #iosdeveloper
Tags and Topics
Browse our collection to discover more content in these categories.
Video Information
Views
103.5K
Likes
2.8K
Duration
27:13
Published
Sep 29, 2023
User Reviews
4.7
(20)