Closed neilt closed 10 years ago
In 6f959da I've modified the delegate method to:
- (NSManagedObjectContext *)ubiquityStoreManager:(UbiquityStoreManager *)manager
managedObjectContextForUbiquityChanges:(NSNotification *)note;
You should now be able to do your custom logic before returning the MOC to USM.
Wow, excellent! When to lunch and when I returned the change was made.
Thank you. Neil
That's because I made it during my lunch time ;-)
My project has two core data models, one that is iCloud synched, and the other which is local only, both in the same context. I need to update some things in the local only model when data changes in iCloud model.
In looking at the following from UbiquityStoreManager.m it looks like I would not get the USMStoreDidImportChangesNotification until after deleted managed objects were already removed from the persistent store?
If I register for NSPersistentStoreDidImportUbiquitousContentChangesNotification directly how do I know that I received this notifications before UbiquityStoreManager has merged the changes and saved?
Is it possible to get a delegate call at the beginning of didImportChanges:. Something like:
This way I can save what I need to process from the notifications, multithreaded aware, for later processing before the data goes away or changes.
Thank you. Neil