如何在较旧的iOS设备上使用ARKit?

如何在较旧的iOS设备上使用ARKit?,第1张

概述对于iOS 11的测试版,即使使用与旧设备兼容的3DOF,ARKit应用程序也会崩溃? 如果不支持ARKit,我该如何防止应用程序崩溃? 支持的设备 从iOS 11开始,can’t在旧设备上使用ARKit: Important ARKit requires an iOS device with an A9 or later processor. To make your app available 对于iOS 11的测试版,即使使用与旧设备兼容的3DOF,ARKit应用程序也会崩溃?

如果不支持ARKit,我该如何防止应用程序崩溃?

解决方法 支持的设备

从iOS 11开始,can’t在旧设备上使用ARKit:

important

ARKit requires an iOS device with an A9 or later processor.

To make your app available only on devices supporting ARKit,use the
arkit key in the UIrequiredDeviceCapabilitIEs section of your app’s
Info.pList. If augmented reality is a secondary feature of your app,
use the isSupported property to determine whether the current device
supports the session configuration you want to use.

设备应具有A9或更高版本的处理器.您只能使用:

> iPhone SE,
> iPhone 6S及更新版(7,8,X),
> iPad(2017)或更新版本,
> iPad Pro(任何).

防止崩溃

要防止应用程序崩溃,您可以使用ARConfiguration的isSupported属性.别忘了检查当前的iOS版本.

import ARKitfunc isARSupported() -> Bool {    guard #available(iOS 11.0,*) else {        return false    }    return ARConfiguration.isSupported}if isARSupported() {    // ARKit is supported. Do what you need.} else {    // ARKit is not supported.}

Before attempting to create an AR configuration,verify that the user’s device supports the configuration you plan to use by checking the isSupported property of the corresponding configuration class. If this property’s value is false,the current device does not support the requested configuration.

总结

以上是内存溢出为你收集整理的如何在较旧的iOS设备上使用ARKit?全部内容,希望文章能够帮你解决如何在较旧的iOS设备上使用ARKit?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1031308.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-23
下一篇2022-05-23

发表评论

登录后才能评论

评论列表(0条)

    保存