The Last SwiftData Tutorial You Will Ever Need
HTML-код
- Опубликовано: 24 июл 2024
- The Last SwiftData Tutorial You Will Ever Need
SwiftUI Camp 👉 rebeloper.com/swiftui-camp
In this SwiftData tutorial, we'll cover everything you need to know about handling data with SwiftUI. We'll cover everything from creating a model to editing and saving data. By the end of this tutorial, you'll have everything you need to know to get started with SwiftData.
If you're new to SwiftUI or data handling in general, then this tutorial is for you. By the end of this video, you'll have everything you need to start using SwiftUI to handle your data the way you want!
00:00 INTRO
01:08 SWIFTUI CAMP
01:48 CREATING A SWIFTUI PROJECT WITH SWIFTDATA
02:50 SWIFTDATA PROJECT IDEA
03:40 DEFINING A DATA MODEL IN SWIFTDATA
05:26 CREATE A MODEL CONTAINER IN SWIFTDATA
06:12 MIGRATION IN SWIFTDATA
07:12 CREATING A VERSIONED SCHEMA IN SWIFTDATA
10:57 SWIFTDATA TYPEALIASES
12:04 CREATE A MODEL CONTAINER FOR A MIGRATION PLAN
15:19 ADD AND UPDATE IN SWIFTDATA
20:00 RELATIONSHIPS IN SWIFTDATA
22:36 QUERY IN SWIFTDATA
25:12 LIST VIEW UI
31:16 HOW TO INSERT A MODEL IN SWIFTDATA
40:30 UPDATE A MODEL IN SWIFTDATA
41:24 DELETE MODELS IN SWIFTDATA
46:30 SORTING QUERY RESULTS IN SWIFTDATA
54:08 USING PREDICATES FOR FILTERING IN SWIFTDATA
58:52 MIGRATING IN SWIFTDATA
01:00:48 CREATING A MIGRATION PLAN IN SWIFTDATA
01:08:15 WHERE TO GO FROM HERE
→ PLAYLIST:
SwiftUI Camp 👉 • Senior SwiftUI Develop...
DO YOU WANT TO ME TO WORK ON YOUR PROJECT?
HIRE ME → rebeloper.com/hire-us/
TOOLS I RECOMMEND:
→ rebeloper.com/tools
__________
Get in touch:
→ support@rebeloper.com
SUBSCRIBE to weekly tips & tutorials for building iOS apps!
→ ruclips.net/user/rebeloper?su...
GitHub: github.com/rebeloper/
Hire me: rebeloper.com/hire-us/
LinkedIn: / rebeloper
My Blog: rebeloper.com/blog
Follow me on Instagram: / rebeloper
Twitter: / rebeloper
______
#rebeloper - Наука
Senior SwiftUI Developer tries SwiftUI Test 👉 ruclips.net/video/9PXR5iXX-7k/видео.html&ab_channel=Rebeloper-RebelDeveloper
Dude I’ve been needing this! TYSM!
Glad I could help!
Shocking: AI Creates Complete iOS App 👇
ruclips.net/video/v2lq4B0VMFk/видео.html
Thanks Alex. Very informative. :)
My pleasure!
Next check out my latest video about Mastering SwiftUI Error Alerts: Fix Your App in Seconds! 👇
ruclips.net/video/glg1koMSyLA/видео.html&ab_channel=Rebeloper-RebelDeveloper
tnx!
Can you tell us a bit about creating a #predicate from other #predicate as it was possible with NSCompoundPredicate.
At the moment SwiftData does not support NSCompoundPredicates :(
🚨 A Subscriber Sent Me a Junior Swift Interview Challenge, Let's Solve It 👇
ruclips.net/video/supzAhPiDZ8/видео.html&ab_channel=Rebeloper-RebelDeveloper
This is great. No more SwiftData videos for me!!
Glad to hear that!
Next watch Master Keychain Access Like a Pro using SwiftUI Property Wrappers 👇
ruclips.net/video/B7HBMYEEZtc/видео.html&ab_channel=Rebeloper-RebelDeveloper
The setup of a database is easier than with coredata, but filtering via predicate at runtime has become more cumbersome
Predicates are always cumbersome because they have to be versatile. I prefer SwiftData anyway :)
🚨 A Subscriber Sent Me a Junior Swift Interview Challenge, Let's Solve It 👇
ruclips.net/video/supzAhPiDZ8/видео.html&ab_channel=Rebeloper-RebelDeveloper
Hi, how I can use onMove modifier on Query?
It's a bit difficult. I can help you on a mentoring session: rebeloper.com/mentoring
Next check out In-App Purchases in SwiftUI: Full Tutorial! 👇
ruclips.net/video/Nxq_ildDObE/видео.html&ab_channel=Rebeloper-RebelDeveloper
hay quá
🤗 Now get ChatGPT 4 for Free in VSCode for iOS and macOS app development 👇
ruclips.net/video/9pech4iVTWU/видео.html&ab_channel=Rebeloper-RebelDeveloper
I encountered a problem in swift data. When i add @Attribute(.unique), and then test it with a duplicate model the app totally crashes. Why is that? Let’s say i have @Model class Trip{ @Attrbiute(unique) var name: String, var count: Int…}. Then i create a SwiftUI view to add a trip to my trips persisted storage. Let say i add a trip with name: “Rome”. Then when i attempt to add another trip with the same name @Attribute(.unique), with the name “Rome”, as the first time, the app just crashes.
Must be a bug in SwiftData. I know that .unique is quite buggy. Does not work with iCloud either.
Shocking: AI Creates Complete iOS App 👇
ruclips.net/video/v2lq4B0VMFk/видео.html