When mergeChangesFromContextDidSaveNotification happens with non faulted objects _newChangedValuesForRefresh__ gets called to fault the objects before merging them, this could be happening on the main thread so it could help to do the following loop in order to bring faulted objects before performing the merge.
NSArray* objects = [notification.userInfo valueForKey:NSUpdatedObjectsKey];
for (NSManagedObject* obj in objects) {
NSManagedObject* mainThreadObject = [mainContext objectWithID:obj.objectID];
[mainThreadObject willAccessValueForKey:nil];
}
When
mergeChangesFromContextDidSaveNotification
happens with non faulted objects_newChangedValuesForRefresh__
gets called to fault the objects before merging them, this could be happening on the main thread so it could help to do the following loop in order to bring faulted objects before performing the merge.