In a UITableViewController
, I use an NSFetchedResultsController
for my data. Everything works fine, except for when I start importing some objects in a separate thread: I use an NSOperationQueue
in which I insert objects into my ManagedObjectContext
. This happens in a separate view.
The NSFetchedResultsController
doesn't seem to like this and writes to the console:
Serious application error. An exception was caught from the delegate of NSFetchedResultsController during a call to -controllerDidChangeContent:. Attempt to create two animations for cell with userInfo (null)
Apparently it tries to fetch the new objects.
On the topic of concurrency, the Core Data Programming Guide says something like using a ManagedObjectContext
for each thread, but that sounds rather complicated.
I now don't know whether I should actually create my own NSOperation
subclass, creating a ManagedObjectContext
in it and so on, or whether it is possible to prevent the NSFetchedResultsController
from updating for some time?
I would appreciate some help, Fabian