NSPredicate * thePredicate1= [NSPredicate predicateWithFormat: @"Title CONTAINS[cd] %@", searchTerm];
If searchterm is an empty string a search using thePredicate1 should return all right?
Wrong.
If it’s nil it’ll return an error.
My problem is I have to create a special case. So if Title is empty (or nil) then I will have to create a predicate that always return true. Because CONTAINS “” always return false.
I think Contains @”” should always return true. Every string contain an empty string
What’s their consideration when they have this issue?
Logs:
What’s your problem again? Is
searchTermnot an object?