HDAugmentedReality
HDAugmentedReality copied to clipboard
iOS 4.2 warning: AVCaptureDevice.devices(...) was deprecated in iOS 10 - fix suggested.
In a tutorial using HDAugmentedReality, I noticed that the call AVCaptureDevice.devices was deprecated in iOS 10
Anyway, I don't know how to do a pull request, but it is easy enough to fix the warning. In the class CameraView, replace
let videoDevices = AVCaptureDevice.devices(withMediaType: AVMediaTypeVideo)
with
let captureDevices = AVCaptureDevice.DiscoverySession.init(deviceTypes: [.builtInWideAngleCamera], mediaType: mediaType, position: position).devices
Rest of the code remains the same. Thank you for a great library!