__NSCFBoolean isEqualToString:]: unrecognized selector sent to instance
value
is a NSNumber object (__NSCFBoolean, because NSNumber is a class cluster) and not a string! Use [value boolValue]
to determine whether it's 0 or 1.
Casting an object doesn't change it's type!