With beta version of iOS 11, ARKit apps crash even when using 3DOF which should be compatible with older devices?
And how can I prevent app crash, if ARKit is not supported?
As of iOS 11, you can't use ARKit on old devices:
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.
Device should have A9 or later processor. You can use only:
To prevent app crash, you can use isSupported property of ARConfiguration
. And don't forget to check current iOS version.
import ARKit
func 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With