Core data + iCloud: exclude certain attributes from sync?

独自空忆成欢 提交于 2019-12-11 11:36:44

问题


I am trying to implement core data sync using iCloud. However, there is one attribute that I don't want to sync. Is there a proper way to tell iCloud to sync most managed objects and attributes, but not others?


回答1:


Right now, Core Data + iCloud does not support this kind of configuration. You may have to split your Data into two Persistent Stores (lokal, cloud).




回答2:


One workaround would be to add the things you do not wish to sync to an entity that includes a unique device identifier.

In this way, they still get synced, but you can use just the data pertinent to the specific device and ignore the data from other devices.



来源:https://stackoverflow.com/questions/13448793/core-data-icloud-exclude-certain-attributes-from-sync

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