Skip to content

Instantly share code, notes, and snippets.

@badeen
Created March 23, 2013 01:51
Show Gist options
  • Save badeen/5226053 to your computer and use it in GitHub Desktop.
Save badeen/5226053 to your computer and use it in GitHub Desktop.
This crashes as a result of line 3. Is this not how you perform searches using MagicalRecord.
[MagicalRecord saveWithBlock:^(NSManagedObjectContext *localContext) {
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"match == nil && failedChoice == NO"];
NSArray *users = [TNDRUser MR_findAllWithPredicate:predicate inContext:localContext];
for (TNDRUser *user in users) {
[user MR_deleteEntity];
}
} completion:nil];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment