My app works great in the simulator under any configuration and in debug configuration on my device but it is crashing on a fetch request I am doing as soon as I create a NSPredicate.
Here is the offending code:
- (void)searchBar:(UISearchBar *)theSearchBar textDidChange:(NSString *)searchText {
//some fetch request code code
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"ItemSKU CONTAINS[c] %@ OR ProductName CONTAINS[c] %@", searchText];
// more code
}
If I remove this line everything works perfectly, but I have to have this predicate.