'AVCaptureDevice' 类型的值没有成员 'supporteddepthdataformats'

Value of type 'AVCaptureDevice' has no member 'supporteddepthdataformats'

Apple 文档中列出了 supporteddepthdataformats https://developer.apple.com/documentation/avfoundation/avcapturedevice.format/2865753-supporteddepthdataformats 但无法从代码中看到:

let device = AVCaptureDevice.default(.builtInWideAngleCamera, for: AVMediaType.video, position: .back)
print("depth data formats: \(device.supportedDepthDataFormats)")

错误消息说:

Value of type 'AVCaptureDevice' has no member 'supporteddepthdataformats'

我正在使用 Xcode 版本 9.2 beta (9C34b),因为当前的官方 Xcode 9.1 不适用于 iOS 11.2。

let device = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .back )
print("depth data formats: \(device?.activeFormat.supportedDepthDataFormats)")

希望对您有所帮助