判断设备是否为ARM64 [英] Determine if the device is ARM64

查看:100
本文介绍了判断设备是否为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屋!

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