NSPredicate – filtering values based on a BOOLEAN stored value

This isn’t really specific to NSPredicate… Whenever you have %@ in a format string, the corresponding value must be a pointer to an object, and BOOL doesn’t qualify. So instead of passing YES, pass [NSNumber numberWithBool: YES].


In newer versions of Xcode and the SDKs than when I originally wrote the answer, you can use @YES instead of [NSNumber numberWithBool: YES].

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)