cocoa - Can't merge data error with coredata -


I have an app that uses coredata, but when I accidentally open the app from different places 2 times, I get his error message "Can not merge data while attempting to close the app.

How can I stop opening another app? Or what information is there any way to merge? Thanks , Jose

There is a lack of concurrency locking in core data, so you Two apps accessing the same store file can not be at the same time.The core data is not a database system but an object graph management system that provides a model layer for the Model-View-Controller Design App if you have a database If you try to use it like a system, you will be in pain.

Usually the problem you have described is to create a library directory. Which contains Sbdirectorij for each instance of the application and each instance stores are put in their dedicated service to the problem does not occur.

You can create a small server with core data that will deliver distributed objects in a proper manner in other processes. If you have many procedures that all require a single continuous shop, then it will be the best bet for you

See an example of how to do this.

Comments