Skip to content

Instantly share code, notes, and snippets.

@nicktoumpelis
Created August 31, 2014 13:28
Show Gist options
  • Save nicktoumpelis/af6d6f57bc1cb49baa63 to your computer and use it in GitHub Desktop.
Save nicktoumpelis/af6d6f57bc1cb49baa63 to your computer and use it in GitHub Desktop.
Core Data: Execute a fetch request
NSManagedObjectContext *managedObjectContext = ...;
NSFetchRequest *fetchRequest = ...;
NSError *error = nil;
NSArray *results = [managedObjectContext executeFetchRequest:request error:&error];
if (error) {
NSLog(@"Error: %@\n%@", [error localizedDescription], [error userInfo]);
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment