SwiftData CloudKit Sync - The Complete Guide

  Рет қаралды 7,135

azamsharp

azamsharp

Күн бұрын

In this video, Mohammad Azam will demonstrate how to integrate SwiftData with CloudKit. Azam will discuss in detail all the required steps you need to setup CloudKit syncing for SwiftData application.
Azam will also cover how you should use built-in @.Query macros to enable tracking and live syncing on multiple devices.
CORRECTION: If you are looking at CloudKit console dashboard, you will be able to find the records under the zone labels as such "com.apple.com.coredata.cloudkit.zone". I believe in the video, I mentioned _defaultZone, which is incorrect. Just use the dropdown to select the correct zone.
Ready to learn more about SwiftData then check out my course:
azamsharp.teac...
#iosdev #iosdeveloper #swiftdata #swiftui Check out my courses at
azamsharp.school/

Пікірлер: 37
@mellymckenzie
@mellymckenzie 11 ай бұрын
This guy is an excellent teacher and I find his teaching technique really helps my learning. Undoubtably one of the best instructional courses on iOS dev I have come across. Thank you
@mohammadazam3177
@mohammadazam3177 11 ай бұрын
Thank you so much!
@mellymckenzie
@mellymckenzie 11 ай бұрын
@@mohammadazam3177 I have just bought three of your courses on Udemy
@edwardsanchez5278
@edwardsanchez5278 7 ай бұрын
Thanks for the video! It would be really useful if you added sections, especially in such a long video!
@chezchezchezchez
@chezchezchezchez 3 күн бұрын
The term is: chapters
@aleksandertesenkov1421
@aleksandertesenkov1421 8 ай бұрын
Great examples, which has many excellent tips and tricks I wasn’t aware of. Thank you so much for the great work.
@FuzeGamer11
@FuzeGamer11 11 ай бұрын
Really helpful video, thanks!
@gccount
@gccount 6 ай бұрын
very detailed, very practical
@vince-the-prince
@vince-the-prince 2 ай бұрын
Super helpful!
@hurolinci5986
@hurolinci5986 9 ай бұрын
Very helpful. who would´ve tot that getting rid of all the yellow messages would solve all the problems.
@NiceLasers
@NiceLasers 9 ай бұрын
Great video!
@kiransankarpati
@kiransankarpati 14 күн бұрын
Can it work if we deploy the app through ad hoc mode, Sir?
@w0mblemania
@w0mblemania 11 ай бұрын
Firstly, thank you very much for this. It was excellent, and a lot of help. Secondly... SwiftData and CloudKit support... it seems very janky right now. Also, do we have any idea how SwiftData migrations work with CloudKit? i.e. do the migrations also update the CloudKit records and do all the required magic?
@azamsharp
@azamsharp 11 ай бұрын
SwiftData and CloudKit works fine for me when using the @Query macro since Query macro enables tracking. I have not done migrations with CloudKit but I assume if you add any new properties then those should be optionals or must have a default value.
@jamesmartin46
@jamesmartin46 4 ай бұрын
Very good I learned a lot, but it was a bit too high level for me. He assumed you had a level of understanding about SwiftData/Coredata, which I don't and he didn't explain some of the basics of what he was doing., Also, he kept using keyboard shortcuts to do things that did not show on the video so I could not replicate what he did. I also did not understand why he spent so much time on getting the Preview to work and the complications that arose from that got me lost and confused so I gave up after 38 minutes.
@azamsharp
@azamsharp 4 ай бұрын
I recommend watching introduction to SwiftData videos first before diving into advanced stuff.
@ryantcb
@ryantcb 10 ай бұрын
just excellent
@keegan8176
@keegan8176 11 ай бұрын
Love your youtube videos and watching all of them. Just wondering, would this work the same way with syncing data between the watch app and phone app?
@azamsharp
@azamsharp 11 ай бұрын
I have never tried it on the watch app but I am assuming that it should be the same.
@davemckee5252
@davemckee5252 11 ай бұрын
Thanks!
@azamsharp
@azamsharp 11 ай бұрын
💗
@uguraltnsy
@uguraltnsy 6 ай бұрын
It works fine for the IOS platform, but I want to use it for VisionOS, I did everything the same way, but I get the error "CloudKit Invalid bundle ID for container"
@nroose
@nroose 9 ай бұрын
Seems bad that when we get an error, we can't use the huge amount of text in the error to help us find the problem, we just have to know or guess what the problem is.
@whatwhatmeno
@whatwhatmeno 9 ай бұрын
For this to work the users need to have space in their Icloud ? also can I read the users notes or not
@rafaelplinio6527
@rafaelplinio6527 7 ай бұрын
If my app supports CloudKit, what happens if I have a ToDo app with items saved, delete the app and local data? Will the data be back when I install again because of iCloud or will it be gone?
@lucaknaup
@lucaknaup 11 ай бұрын
Is it possible to share data between different iCloud users with SwiftData?
@azamsharp
@azamsharp 11 ай бұрын
From what I have read I believe SwiftData currently only works with user's private database.
@financelician3564
@financelician3564 11 ай бұрын
Any idea on when that will be available? @@azamsharp
@azamsharp
@azamsharp 11 ай бұрын
@@financelician3564 No idea.
@allenwixted1992
@allenwixted1992 9 ай бұрын
@@azamsharpI think you can declare a public database
@azamsharp
@azamsharp 9 ай бұрын
Hi Allen, Any resources for public databases?
@rwilson1125
@rwilson1125 11 ай бұрын
Pita here: I am stuck at the List( vegetable.notes ?? [] step. Xcode is telling me that "Initializer 'init_:rowContent' requires '[Note]?' conform to "RandomAccessCollection". Does not @Model do this for us? I am Xcode 15.0. Are you on a beta ahead?
@azamsharp
@azamsharp 11 ай бұрын
Yes. Once you conform the Note model to Model macro it should work. Move forward in the video little bit more as we end up not using vegetable.notes.
@rwilson1125
@rwilson1125 11 ай бұрын
@@azamsharp yes, progessed to end of the video, now it compiles, but adding a note in the simulator crashes.
CloudKit - Intro, Pricing, Terms, & Definitions
17:26
Sean Allen
Рет қаралды 22 М.
The Joker wanted to stand at the front, but unexpectedly was beaten up by Officer Rabbit
00:12
Секрет фокусника! #shorts
00:15
Роман Magic
Рет қаралды 116 МЛН
Шок. Никокадо Авокадо похудел на 110 кг
00:44
Concurrency of SwiftData, by Donny Wals (English)
31:08
CocoaHeadsNL
Рет қаралды 2,4 М.
Setup CloudKit in SwiftUI project and get user info | Advanced Learning #21
33:02
SwiftData Basics in 15 minutes
15:18
CodeWithChris
Рет қаралды 45 М.
Intro to Databases (MySQL, CloudKit, Firebase, Core Data, Realm)
20:43
CoreData в Swift. Разработка приложений
47:55
simpleDEV. Swift c нуля до бесконечности
Рет қаралды 9 М.
8. SwiftData   CloudKit
18:20
Stewart Lynch
Рет қаралды 7 М.
The Joker wanted to stand at the front, but unexpectedly was beaten up by Officer Rabbit
00:12