NSNumber
lastmod 2026-11-10created 2014-03-263 edits
NSNumber is a class in the Objective-C Foundation framework that wraps C's primitive numeric types as objects. Scalar values such as int, float, double, and BOOL cannot be put directly into collections such as NSArray or NSDictionary, so they are turned into NSNumber with numberWithInt:, numberWithBool:, and so on for storage, and converted back with intValue or boolValue when taken out. They can also be created with literal syntax such as @42 and @YES.
BOOL Wrapper
To get it out: