How do I set up a NSPredicate to look for objects that have a nil attribute

I think it’s a case sensitivity issue. You can use “nil” or “NULL”, but not “NIL”. This works fine for me:

NSPredicate *eventWithNoEndDate = [NSPredicate predicateWithFormat:@"endDate = nil"];

Leave a Comment