确定设备是否为ARM64 [英] Determine if the device is ARM64
本文介绍了确定设备是否为ARM64的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试对iOS 7进行调整,以便当设备是ARM64时它会运行一个版本,而当它不运行时它会运行另一个版本(因为float是32位而double是64(如果你有的话)解决方案让我知道。)
I'm trying to make a tweak for iOS 7 so that when a device is ARM64 it runs one version and when it is not it runs another (since float is for 32 bit and double is for 64 (If you have a solution for that let me know.)
所以它就像这样
if ARM64 {
\\run double code
}
else {
\\run float code
}
推荐答案
您可以执行以下操作
#if __LP64__
\\You're running on 64 bit
#else
\\You're running on 32 bit
#endif
这篇关于确定设备是否为ARM64的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文