We have a model in iOS with the id property. Here is what we are using now (by the way, this is iOS 5).
@property (nonatomic, assign) int userID;
Everything seems to be working fine. I am wondering if this will lead to further problems.
Example. I understand that this means that the ID property itself cannot be stored in plist. However, this is a property of NSObject. If we store anything in the file / core data / nsuserdefaults / whatever it is, this is the whole object, not just this property.
I guess my question is ... are we going to cause us any problems storing this as an int, not an NSNumber?
Secondly, what's the difference in keeping this as an NSInteger. I understand that it is just a def type for long or int, depending on the architecture. Since we focus only on the iPhone, does it matter that it is just set to int? It seems that in this case it would not have made any difference.
source share