I have setup few methods to load core data in the background using NSOperationQueue, like the below:
operation = [[NSInvocationOperation alloc] initWithTarget:self
selector:@selector(selectToLoadDataOne) object:nil];
operation = [[NSInvocationOperation alloc] initWithTarget:self
selector:@selector(selectToLoadDataTwo) object:nil];
The "selectToLoadDataOne" and "selectToLoadDataTwo" is just standard NSFetchRequest using the template NSManagedContext from app delegate. Problem is that after loading a few times, it just stop loading altogether and stuck at executeFetchRequest: and without any error.
I know this is related to using of threads with core data, and so I tried to create a new nsmanagedobjectcontext for each call but the result returned are empty nsmanagedobject.
Can someone point me to a good example or doc I can use to solve the loading of core data from background thread?