According to Major 64-Bit Changes int & long sizes are 4 and 8 bytes. But when I run on iOS 64-bit simulator with following code:
NSLog(@"NSInteger size: %i", sizeof(NSInteger));
NSLog(@"int size: %i", sizeof(int));
NSLog(@"long size: %i", sizeof(long));
The output is
NSInteger size: 4 int size: 4 long size: 4
So, the sizes tell us another. What's output on real device?
Yes, the simulator is 64-bit. You get this output because probably your app is not compiled for 64-bit. In your project settings select the following (including 64-bit)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.