【发布时间】:2020-11-11 16:03:24
【问题描述】:
我在代码中使用这个函数来检测 A9 或更高版本的设备:
public static var gpuFamily3AndHigh:Bool = {
return ARConfiguration.isSupported //Hack to know A9 or more
}
但现在 Apple 拒绝了该代码,因为该应用没有 ARKit 功能。在 iOS 13 和 iOS 12 上如何在不使用 ARKit 的情况下识别它。在 iOS 13 上,我知道我可以做到:
public static var gpuFamily3AndHigh:Bool = {
// return ARConfiguration.isSupported //Hack to know A9 or more
guard let device = MTLCreateSystemDefaultDevice() else { return false }
return device.supportsFamily(.apple3)
}()
但我不知道 .apple3 是否比 .common3 是正确的常量,以及我在 iOS 12 上该怎么办?
【问题讨论】:
标签: ios swift arkit metal metalkit