How to get front camera, back camera and audio with AVCaptureDeviceDiscoverySession in Objective C for ios sdk < 11

189 Views Asked by At

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 screenshot 1 screenshot 2.

Similar question is posted but it did not provide an answer for Objective c code and ios versions lower than SDK 11

0

There are 0 best solutions below