First I convert BOOL value to NSNumber in order to put it into NSUserDefaults. Later I would like to retrieve the BOOL value from the NSUserDefaults, but obviously I get NSN
The ONLY way I managed to finagle a NSNumber's "booleanity" from its NSConcreteValue(doh!) was with the following...
id x = [self valueForKey:@"aBoolMaybe"];
if ([x respondsToSelector:@selector(boolValue)] &&
[x isKindOfClass:objc_getClass("__NSCFNumber")])
[self doSomethingThatExpectsABool:[x boolValue]];
Every other trick... FAILED. Buyer beware, this isn't foolproof (__NSCFNumber may well be platform/machine specific - it is solely Apple's implementation detail)... but as they say.. nothing else worked!