iphone Programming Glossary: savenotification
Cryptic error from Core Data: NSInvalidArgumentException, reason: referenceData64 only defined for abstract class http://stackoverflow.com/questions/2009399/cryptic-error-from-core-data-nsinvalidargumentexception-reason-referencedata6 changes causes the fetched results controller to update its results void threadControllerContextDidSave NSNotification saveNotification need to unlock before we let main thread merge persistentStoreCoordinator unlock self performSelectorOnMainThread @selector.. merge persistentStoreCoordinator unlock self performSelectorOnMainThread @selector mergeToMainContext withObject saveNotification waitUntilDone YES void mergeToMainContext NSNotification saveNotification NSError error managedObjectContext mergeChangesFromContextDidSaveNotification.. @selector mergeToMainContext withObject saveNotification waitUntilDone YES void mergeToMainContext NSNotification saveNotification NSError error managedObjectContext mergeChangesFromContextDidSaveNotification saveNotification if managedObjectContext save..
How to sync CoreData and a REST web service asynchronously and the same time properly propagate any REST errors into the UI http://stackoverflow.com/questions/3077444/how-to-sync-coredata-and-a-rest-web-service-asynchronously-and-the-same-time-pro You can use NSManagedObjectContextDidSave notifications for this. void managedObjectContextDidSave NSNotification saveNotification NSArray inserted saveNotification userInfo valueForKey NSInsertedObjects for NSManagedObject obj in inserted create a new.. notifications for this. void managedObjectContextDidSave NSNotification saveNotification NSArray inserted saveNotification userInfo valueForKey NSInsertedObjects for NSManagedObject obj in inserted create a new NSOperation for this entity which..
Generic approach to NSManagedObjectContext in multi-threaded application http://stackoverflow.com/questions/3474960/generic-approach-to-nsmanagedobjectcontext-in-multi-threaded-application function we perform the merge if called by the notification in commit . void contextDidSave NSNotification saveNotification MyAppDelegate delegate MyAppDelegate UIApplication sharedApplication delegate NSManagedObjectContext moc delegate.managedObjectContext.. moc performSelectorOnMainThread @selector mergeChangesFromContextDidSaveNotification withObject saveNotification waitUntilDone YES Finally we clean up the cache of NSManagedObjectContext with this void initialize NSNotificationCenter..
|