I’ve had a lot of fun working with
CKSyncEngineover the last month or so. I truly think it’s one of the best APIs Apple has built, and they’ve managed to take a very complex topic (cloud syncing) and make it very digestible and easy to integrate, without having to get into the weeds ofCKOperationand whatnot like you had to in previous years.
Historically, it’s been hard to get started with. The learning curve is higher than most frameworks, making the barrier to entry a non-starter for many developers. But today, I’m here to help anyone who wants to figure out how sync works in iOS apps. With the new
CKSyncEngine, it’s much, much easier to implement. Apple is dogfooding it too — both Freeform andNSUbiquitousKeyValueStoreuse it.
8-part series on using CloudKit with examples.
There is one major platform limitation I’ve run into: when you disable iCloud Drive, this also disables iCloud (CloudKit) access to apps like Tact, even though the UI indicates otherwise.
What is it like to sync data from Core Data to iCloud using Apple’s new NSPersistentCloudKitContainer? Here I provide an example project and walkthrough for saving and syncing a single Core Data Entity with CloudKit using this new class.