Determine if iOS device is 32- or 64-bit

前端 未结 7 574
清歌不尽
清歌不尽 2020-12-01 04:03

Does anyone know of an easy way to tell if an iOS7 device has 32- or 64-bit hardware? I don\'t mean programmatically, I just mean via settings, model number, 3rd-party app,

7条回答
  •  长情又很酷
    2020-12-01 04:11

    There is no other "official" way to determine it. You can determine it using this code:

    if (sizeof(void*) == 4) {
        NSLog(@"32-bit App");
    } else if (sizeof(void*) == 8) {
        NSLog(@"64-bit App");
    }
    

提交回复
热议问题