确定iOS设备是32位还是64位 [英] Determine if iOS device is 32- or 64-bit

查看:600
本文介绍了确定iOS设备是32位还是64位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道一个简单的方法来判断iOS7设备是否具有32位或64位硬件?我不是指编程方式,我只是指通过设置,型号,第三方应用程序等。

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, etc.

我遇到的问题我怀疑是64-有点相关。 Apple的建议是在64位模拟器上进行测试,但也要在实际的64位设备上进行测试,但之后并没有说明如何确定。我可以编写一个测试应用程序来检查sizeof(int)或者其他什么,但是必须有一些方法可以让技术支持知道他们正在使用它们。

I'm having a problem that I suspect is 64-bit related. Apple's advice is to test on the 64-bit simulator but also on an actual 64-bit device, but then doesn't say anything about how to determine that. I can write a test app to check sizeof(int) or whatever, but there's got to be some way for, say, tech support to know what they're working with.

Eric

推荐答案

没有其他官方方式来确定它。您可以使用以下代码确定它:

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");
}

这篇关于确定iOS设备是32位还是64位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆