You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if you're like me, you're neck deep in WWDC23 sessions this week. There are two big announcements to ponder: SwiftData and CKSyncEngine.
SwiftData looks exactly as I imagined it. I think it will be relatively easy to convert our model classes to SwiftData @model, while still using a local store and CloudCore to sync. To that end, I've been thinking of refactoring CloudCore from a singleton to a self-contained class called NSPersistentCloudCoreContainer, much like Apple's NSPersistentCloudKitContainer.
I've also been thinking about ways to reduce/eliminate the need to annotate the schema file itself, and move to pure protocols for things like Cacheable conformance. SwiftData shows us how to use the new Swift Macros feature to do that. Cacheable requires a very specific set of attributes, and it's a lot of boilerplate code, which sounds perfect for @CloudCore and @cachable macro to me.
CKSyncEngine looks fantastic, and I particularly appreciate that Apple uses it in production code!! That said, I need to dive in deeper to see how it works, and if I can replace parts of the underlying CloudCore code base with it. The key will be if I can maintain the implementation of Cacheable.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
if you're like me, you're neck deep in WWDC23 sessions this week. There are two big announcements to ponder: SwiftData and CKSyncEngine.
SwiftData looks exactly as I imagined it. I think it will be relatively easy to convert our model classes to SwiftData @model, while still using a local store and CloudCore to sync. To that end, I've been thinking of refactoring CloudCore from a singleton to a self-contained class called NSPersistentCloudCoreContainer, much like Apple's NSPersistentCloudKitContainer.
I've also been thinking about ways to reduce/eliminate the need to annotate the schema file itself, and move to pure protocols for things like Cacheable conformance. SwiftData shows us how to use the new Swift Macros feature to do that. Cacheable requires a very specific set of attributes, and it's a lot of boilerplate code, which sounds perfect for @CloudCore and @cachable macro to me.
CKSyncEngine looks fantastic, and I particularly appreciate that Apple uses it in production code!! That said, I need to dive in deeper to see how it works, and if I can replace parts of the underlying CloudCore code base with it. The key will be if I can maintain the implementation of Cacheable.
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions