My Usecase:
For an automatic export running once in a while I build an HelperApp, while the configuration of still is made in the MainApp.
My Setup:
- MainApp (writes data)
HelperApp (mostly reads data but also writes to very few fields)
both Apps share a single core data persistent store using the same myapp.storedata file in a Group Contrainer
- both Apps observe
NSManagedObjectContextDidSaveNotification
tell each other throughNSDistributedNotificationCenter
when their context got saved- this works, so the other App knows when it should update it's persistent store / managed object context
- both Apps are sandboxed
My Problem:
I can not pass NSManagedObjectContextDidSaveNotification
to the other app through NSDistributedNotificationCenter
How can I either
- Cause the core data stack of any app to reload it's data?
or
- Merge changes from the other app so that MOC gets updated?