This is how " NSInteger " is defined in " NSObjCRuntime.h " in older SDKs:
#if __LP64__ || (TARGET_OS_EMBEDDED && !TARGET_OS_IPHONE) || TARGET_OS_WIN32 || NS_BUILD_32_LIKE_64 typedef long NSInteger; typedef unsigned long NSUInteger; #else typedef int NSInteger; typedef unsigned int NSUInteger; #endif
As of September 2013, iPhones can now work with 64-bit chips, which means that NSInteger can be much larger.
In my own coding, if I make pure Objective-C, I will stick with NSInteger , as this future confirms my code for the string. On the other hand, open source materials and some programmers like to use " uint32_t " or " int32_t " and other explicit types like this, so when I see them, I try to match their style in the code I'm working with.
source share