简体   繁体   中英

Crash on response of requestAccessForMediaType when asking permission for camera

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.

应用程序的Info.plist必须包含一个NSCameraUsageDescription键,其中包含一个字符串值,向用户解释应用程序如何使用此数据。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM