Why does this not work:
NSInteger temp = 20;
[userSettingsFromFile setObject:temp forKey:@\"aTemp\"];
but this does:
[userS         
        
Correction: Whatever is passed through setObject: do not have to be derived from the NSObject class, but it must conform to the NSObject protocol, that defines retain and release.
It can be confusing, but classes and protocols have different name spaces. And there is a both a class and a protocol named NSObject, the class NSObject conforms to the protocol NSObject. There is one more root class, the NSProxy class that also conforms to the NSObject protocol.
This is important, because otherwise proxies could not be used in collections and auto release pools, while still having a lightweight proxy root class.