Core Data Background Fetches

Number:rdar://15183183 Date Originated:10/8/2013
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 7
Classification:Feature (New) Reproducible:

Fetching on the main thread can’t help but block the main thread. Longer fetches block for longer.

To do a background fetch and return results to the main thread, it's necessary to use a separate NSManagedObjectContext and pass managed object IDs back to the main thread, which are then turned into managed objects.

I'd like to see an API that lets me write code like this:

[managedObjectContext performFetchInBackground:fetchRequest completion:^(NSArray *fetchedObjects) {
    // Do something with fetchedObjects.
    // On the main thread here.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!