r/iOSProgramming•
Z4xor

NSFetchedResultsController / Delegate question when fetching on background thread

Hi all,

I'm having trouble getting my NSFetchedResultsControllerDelegate methods called when the data is fetched using a NSFetchedResultsController setup with a NSManagedObjectContext created with a concurrency type of NSPrivateQueueConcurrencyType (phew that's a lot of big words!).

I did a lot of searching online and wasn't able to see anything clear cut as "wrong" or "right" when using this type of setup. Almost all tutorials/demos out there show the NSFetchedResultsController being used to load data on the UI as using the main NSManagedObjectContext so this is not an issue, but in the app I am working on the fetches are expensive/slow (even with optimization in place) which block the UI when done on the main thread, thus we want to use a background thread...

I have more information contained here: https://stackoverflow.com/questions/49244332/nsfetchedresultscontroller-with-privatequeueconcurrencytype-changes-do-not-cal

Any ideas? Thanks in advance! Zach

Posted Mar 12, 2018, 9:07 PM UTC

29
Loading comments…