开发者

share core-data store between apps

开发者 https://www.devze.com 2023-02-14 06:03 出处:网络
Let\'s say I have a pref pane and an app. Both should share data stored in a coredata store. Is it possible to access the sa开发者_高级运维me file from both app or am I going to run with scissors?If

Let's say I have a pref pane and an app. Both should share data stored in a coredata store.

Is it possible to access the sa开发者_高级运维me file from both app or am I going to run with scissors?


If both have the same models, they will be able to use the same store. But having multiple applications accessing the same store could introduce inconsistencies if they are both running at the same time. You will need to plan accordingly using conflict resolution. See http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/CoreData/Articles/cdChangeManagement.html%23//apple_ref/doc/uid/TP30001201-CJBDBHCB. You may also need a way for one to tell the other that it changed the data and it should reload.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号