iOS 64位模拟器真的是64位吗?

时间:2013-12-11 14:53:59

标签: ios objective-c

根据Major 64-Bit Changes int&长大小为4和8字节。但是当我使用以下代码在iOS 64位模拟器上运行时:

NSLog(@"NSInteger size: %i", sizeof(NSInteger));
NSLog(@"int       size: %i", sizeof(int));
NSLog(@"long      size: %i", sizeof(long));

输出

 NSInteger size: 4
 int       size: 4
 long      size: 4

因此,尺寸告诉我们另一个。真实设备上的输出是什么?

1 个答案:

答案 0 :(得分:9)

是的,模拟器是64位的。你得到这个输出,因为你的应用程序可能不是为64位编译的。在项目设置中,选择以下(包括64位)

enter image description here

相关问题