Crash on response of requestAccessForMediaType when asking permission for camera

324 Views Asked by At

I have an issue for devices using iOS 10, where on first launch of app, when I try to use camera, appears the pop-up describes the reason app needs to use the camera, and either the user accepts it either declines it, the app will crash. After that, application crashes on splash screen.

This issue happens only if the user tries to use the camera the first time the app launched. If user will not use the camera the first time and terminates the app, the next time the camera opens properly.

I added also the NSCameraUsageDescription in my info.plist but the only think is changing is the message in pop-up.

1

There are 1 best solutions below

1
On

The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.