Getting permission to use the camera or photo library
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.
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 the
Info.plist
file in the Project navigator. Move your pointer over the Information Property List row and click the + button to create a new row. - In the new row, set the Key to Privacy – Photo Library Usage Description and set the Value to
This app uses photos in your photo library when creating journal entries
. - Add a second row using the + button. This time, set the Key to Privacy – Camera Usage Description and set the Value to
This app uses your camera when creating journal entries
. YourInfo.plist
file should look like...