I’ve an issue that is unusual. When I test my app with XCode evertything is working on my iphone and the other iphones, the app asks to user for all permissions. But when I added my app to TestFlight, the app does not ask camera and microphone permissions to user? "Privacy – Camera Usage Description" and "Privacy – Photo Library Usage Description" keys are already added to info.plist file. The app behaves different on TestFlight, how can it be?
3
Answers
If the user has previously denied the use of the camera, then the status will be AVAuthorizationStatusDenied and the dialog will not be displayed when asking for permissions.
To make sure your app has permission before capturing media, follow the steps below.
Configure Your App’s Info.plist File
iOS requires that your app provide static messages to display to the user when the system asks for camera or microphone permission:
Description key in your app’s Info.plist file.
Library Usage Description key in your app’s Info.plist file
Verify and Request Authorization for Capture
You can add below code in AppDelegate main file OR while click on capture media to request access authorization.
Apple Ref Link https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_ios
Actually, we faced with the similar issue recently. In our case, the solution was related to signing.
If you’re checked the automatically manage signing box in Xcode, you can try this to fix this issue:
By these steps we fixed our permission issue in TestFlight. I hope this post will help someone in someday.