Core Data syncing

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 10:03:50

问题


is there a way to automatically sync my Core Data Model with a server (preferably REST)?

Thanks


回答1:


Apple has shared their Sync Services Framework it is documented here:

http://developer.apple.com/documentation/Cocoa/Conceptual/SyncServices/SyncServices.html

This section is specifically related to syncing managed objects:

http://developer.apple.com/documentation/Cocoa/Conceptual/SyncServices/Articles/UsingCoreData.html#//apple_ref/doc/uid/TP40005232

As for which style of data transfer is used, I'm not sure if it using REST, I don't see it immediately obvious.

Typically the data transferred to and from REST services doesn't include large binary objects or complex data structures. If REST is a requirement you may need to do something custom, but search through the available documentation you might find everything you are looking for.



来源:https://stackoverflow.com/questions/738645/core-data-syncing

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