ARSessionConfiguration unresolved in Xcode 9 GM

早过忘川 提交于 2019-12-05 08:16:42

ARWorldTrackingSessionConfiguration has been deprecated and renamed to ARWorldTrackingConfiguration: See here

Also, ARSessionConfiguration has been deprecated and renamed to ARConfiguration, which is now an abstract base class.

Use AROrientationTrackingConfiguration when you don't want world tracking, instead of using a generic ARConfiguration. Thus:

let configuration = AROrientationTrackingConfiguration()

You can also check if world tracking is supported on a device:

if ARWorldTrackingConfiguration.isSupported {
   configuration = ARWorldTrackingConfiguration()
}
else  {
   configuration = AROrientationTrackingConfiguration()
} 

In Xcode 9 GM, looks like ARWorldTrackingSessionConfiguration has been renamed to ARWorldTrackingConfiguration:

https://developer.apple.com/documentation/arkit/arworldtrackingconfiguration

Reference to this change:

https://github.com/markdaws/arkit-by-example/issues/7

ARSessionConfiguration has been renamed to ARConfiguration:

https://developer.apple.com/documentation/arkit/arconfiguration

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!