HDAugmentedReality icon indicating copy to clipboard operation
HDAugmentedReality copied to clipboard

iOS 4.2 warning: AVCaptureDevice.devices(...) was deprecated in iOS 10 - fix suggested.

Open Ri- opened this issue 5 years ago • 0 comments

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!

Ri- avatar Apr 10 '19 11:04 Ri-