简体   繁体   English

核心数据 + iCloud:从同步中排除某些属性?

[英]Core data + iCloud: exclude certain attributes from sync?

I am trying to implement core data sync using iCloud.我正在尝试使用 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?有没有一种正确的方法可以告诉 iCloud 同步大多数托管对象和属性,而不是其他对象和属性?

Right now, Core Data + iCloud does not support this kind of configuration.目前,Core Data + iCloud 不支持这种配置。 You may have to split your Data into two Persistent Stores (lokal, cloud).您可能需要将数据拆分为两个持久存储(本地、云)。

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.通过这种方式,它们仍然会同步,但您可以只使用与特定设备相关的数据,而忽略来自其他设备的数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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