简体   繁体   中英

“Core Data with iCloud” vs “iCloud Core Data”

My question is: how do I find more information about "Core Data with iCloud" without finding too much "iCloud Core Data"?

These two things are named very similarly, which makes it very hard to find information about one without also finding the other.

When I say "iCloud Core Data", I am referring to the functionality that has been recently deprecated in iOS10. "iCloud Core Data" involved Core Data stores with ubiquity options, which meant that individual records updates were synchronized using iCloud across various devices.

When I say "Core Data with iCloud", I mean a different functionality that is built on the iCloud Drive service and I believe is based on synchronizing a Core Data store as a whole from device to device. "Cord Data with iCloud" apparently is continuing.

Apple differentiates the two: Only the client Core Data iCloud API symbols are deprecated. Core Data with iCloud is built on top of the iCloud Drive service.

Can anyone help point out some documentation about the newer "Core Data with iCloud" ?

I think this is what you are looking for Incorporating iCloud with CoreData

Basically you have a CoreData store in your app and enabling iCloud can keep it synced across devices without your app needing to directly communicate with CloudKit.

I think the "iCloud Core Data" refers to using CloudKit as the data store which isn't horrible but it's not as easy as simply using CoreData.

There's no system for synchronizing the entire Core Data persistent store file across devices via iCloud. The reason they built the now-deprecated iCloud support into Core Data is because synchronizing the document file doesn't work. Doing so is more or less guaranteed to lose data, corrupt the file, or both.

Using CloudKit is sometimes referred to as using iCloud, which is unfortunate since it confuses two different things.

If you want to synchronize Core Data across devices without using CloudKit, look into Ensembles . It's conceptually the same idea as the old iCloud support but with a different implementation that appears to work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM