How do I use CoreData with NSFileCoordinator? Does one of the frame-work provided classes in the CoreData stack implement the NSFilePresenter protocol, or do I have to build a wrapper that adds/removes persistent stores every time I need to relinquish / p

I'd like to have a CoreData store in a shared app group container between my app and an extension. Since iOS 8.2, file coordination supports that file setup, but I don't see the classes in the CoreData stack which conform to the NSFilePresenter protocols, nor own an NSFileCoordinator.

While most of the time I expect the app to be dormant while the extension is running, there will be brief moments of important cross link where a user starts in the extension, but has to pull up the app to continue.

Or maybe do the coredata stores handle syncing in some other way already?

Accepted Reply

A standard CoreData stack uses file access arbitration from the underlying (my?)SQL(lite?) implementation. It's not FilePresenters, but it does permit two processes to access the same-on-disk store without error.

Replies

Ben:


Pls. try to avoid using the title as your question, thanks...


See For Best Results - Read the Label


Ken

A standard CoreData stack uses file access arbitration from the underlying (my?)SQL(lite?) implementation. It's not FilePresenters, but it does permit two processes to access the same-on-disk store without error.