I am changing the CoreData setting to 2 NSManagedObjectContextbelow 1 NSPersistentStoreCoordinator.
- The root context
NSManagedObjectContext created with NSPrivateQueueConcurrencyTypeand setNSMergeByPropertyStoreTrumpMergePolicy - The main context
NSManagedObjectContext created by using NSMainQueueConcurrencyTypeis also set toNSMergeByPropertyStoreTrumpMergePolicy
Both of them are not related by the parent-child relationship, but they are assigned the same object NSPersistentStoreCoordinator. The main context listens for the Root Context notification NSManagedObjectContextDidSaveNotificationand performs the necessary merge insideperformBlock:
Sometimes, when an instance is NSFetchedResultsControllerconnected to the Main Context , does performFetchI get
The application terminated due to the uncaught exception "NSInternalInconsistencyException", reason: "the instruction is still active"
I am wondering if I need to do what I am doing here or the Core Data limitation.
thanks
source
share