Getting permission to use the camera or photo library
As mentioned earlier, Apple stipulates that your app must inform the user if it wishes to access the camera or photo library. If you don't do this, your app will be rejected and will not be allowed on the App Store.
Important note
To learn more about requesting permission to use the camera, go to https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_ios.
You'll modify the Info.plist
file in your project to make your app display messages when it tries to access the camera or photo library. Follow these steps:
- Click
Info.plist
in the Project navigator to display a list of keys. Move your mouse pointer over any existing key and click the + button: - A field should appear, allowing you to enter an additional key: