Desktop iCloud Integration

So far in this chapter we’ve focused primarily on iOS; the reason is that the desktop implementation is actually a subset of the iOS implementation. There’s no UIManagedDocument on the desktop. As a result, we must use the traditional Core Data stack and add the options to the NSPersistentStoreCoordinator ourselves. Even if we’re using an NSPersistentDocument, we must still handle adding the options for the NSPersistentStoreCoordinator.

To build a new Core Data desktop application and implement iCloud data syncing, refer to Direct NSManagedObjectContext to iCloud for information, because the steps are identical. Further, to migrate an existing desktop application that uses a traditional Core Data stack, refer to ...

Get Core Data in Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.