Post

Replies

Boosts

Views

Activity

Reply to CKSyncEngine & SwiftData
At the end of the day, SwiftData is just a bunch of swift classes, and so it can be as simple or complex as you want to make them. Have you figured out how to link SwiftData with CloudKit containers? I'm still trying to work that out. The ModelContainer is created in the body of the app, and that doesn't take a cloud kit container name. I'd love to see a sample of how you're doing that.
Jun ’23
Reply to CKSyncEngine & SwiftData
What do you mean that CKSyncEngine is a third-party framework? It's a native part of CloudKit. I'm just starting to play with this myself, but as far as I can tell you can use SwiftData with CKSyncEngine. The sample Apple provided, at https://github.com/apple/sample-cloudkit-sync-engine, shows linking CloudKit to your model. The model could be a SwiftData model that just includes something like a var cloudKitRecordId: CKRecord.ID? property.
Jun ’23