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

女生的网名这么多〃 提交于 2019-12-03 20:30:34

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!