I tried using code given in sample of apple developer site, also I tried to run the same sample code but it crashes on same place for on Ipads with ios versions less than 11. The code breaks on the following line
NSArray<AVCaptureDeviceType> *deviceTypes = @[AVCaptureDeviceTypeBuiltInWideAngleCamera, AVCaptureDeviceTypeBuiltInDualCamera];
I tried using either of the device types but it keeps crashing on the same line providing no clue what's happening. I have attached screenshot of the stacktrace
.
Similar question is posted but it did not provide an answer for Objective c code and ios versions lower than SDK 11