I am facing issue to create NSPredicate type object with predicateWithFormat method.
AppDelegate *appdelegateObj = (AppDelegate *)[[UIApplication sharedApplication] delegate];
self.managedObjectContext = [appdelegateObj managedObjectContext];
NSString *emailWithBackslashedAtTheRate = [email stringByReplacingOccurrencesOfString:@"@" withString:@"\\@"];
NSFetchRequest *fetchRequestObj = [NSFetchRequest fetchRequestWithEntityName:@"Usertable"];
NSMutableArray *dataList;
**NSPredicate *predicate = [NSPredicate predicateWithFormat:[NSString stringWithFormat:@"email CONTAINS[c] %@",emailWithBackslashedAtTheRate]];**
[fetchRequestObj setPredicate:predicate];
@synchronized(delegate.persistentStoreCoordinator) {
NSError *error = nil;
NSMutableArray *filteredUser = (NSMutableArray *)[self.managedObjectContext executeFetchRequest:fetchRequestObj error:&error];
}
Can anybody explain, what is issue?