问题
In Apple presentation they said if ARWorldTrackingConfiguration not supported we can use the lesser AROrientationTrackingConfiguration (previously named ARSessionConfiguration).
But when I try this on an A8 device (iPad mini 4), it makes no difference whether to let ARWorldTrackingConfiguration()
fail or not. Tracking just don't work.
if ARWorldTrackingConfiguration.isSupported {
let configuration = ARWorldTrackingConfiguration()
sceneView.session.run(configuration)
}
else {
sceneView.session.run(AROrientationTrackingConfiguration())
}
If A8 will not support ARKit, what's the point of supporting AROrientationTrackingConfiguration()?
回答1:
All of ARKit supports only A9 and up, including AROrientationTrackingConfiguration
. As they say at the top of the ARKit docs...
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.
So you can indeed make an iOS 11 app that's available only on a subset of iOS 11 devices. Requiring something in UIRequiredDeviceCapabilities
makes the App Store not offer your app on devices you don't support, and makes iTunes refuse to install the app.
(Yeah, it looks like Apple took a bit to get their story straight here. Back at WWDC it looked like they'd support 3DOF tracking on lesser devices, but now you need A9 even for that.)
So what's the point of AROrientationTrackingConfiguration
now?
For some kinds of app, it might make sense to fall back from world tracking (6DOF) to orientation-only tracking (3DOF) when current conditions don't allow 6DOF. That doesn't make much sense for apps where you put virtual objects on tables, but if you're just putting space invaders in the air for your player to shoot at, or using AR to overlay constellations on the sky, losing 6DOF doesn't wreck the experience so much.
回答2:
I suppose that Apple implemented this interface in a dummy way for devices not supporting ARKit to not make them crash if ARKit is used in an application and let it run with less features than on A9+ devices.
回答3:
If you want to support a larger set of devices, 8th Wall XR is the library that you want. It supports a lot more devices than the latest iOS. The same code will also work on Android if you ever decide to get your app into that segment.
来源:https://stackoverflow.com/questions/46014284/support-arkit-in-lower-end-devices