self.parentContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
[self.parentContext setPersistentStoreCoordinator: coordinator];
self.context = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSMainQueueConcurrencyType];
self.context.parentContext = self.parentContext;
[incrementalStore addObservingManagedObjectContext:self.context];
[incrementalStore addObservingManagedObjectContext:self.parentContext];
But that doesn't work : THREAD-SAFETY VIOLATION: This database is being used on a thread it wasn't "
" created on! Please see the concurrency guidelines in the Couchbase Lite "
"documentation.
So my question is : what's the best practice to perform a save that doesn't slow the UI ?
Thanks