I\'m developing an application where I need to both calculate things (multiple seconds operations) and write things (sync data with a server) on a background thread.
Bec
I had this problem and the solution was making sure all operations on the parent MOC are done with performBlock:, even the initial setup:
parentManagedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
[parentManagedObjectContext performBlock:^{
[parentManagedObjectContext setMergePolicy:NSMergeByPropertyObjectTrumpMergePolicy];
[parentManagedObjectContext setPersistentStoreCoordinator:coordinator];
}];
Once I did this, my child MOCs started picking up changes.