Skip to content

Commit 8ec880a

Browse files
committed
add NSPhotoLibraryAddUsageDescription to list of permissions along with an example of how the plist would be updated
1 parent 54a9b0b commit 8ec880a

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,23 @@ IMPORTANT NOTE: You'll still need to perform step 4 for iOS and steps 2 and 5 fo
3636
1. In the XCode's "Project navigator", right click on your project's Libraries folder ➜ `Add Files to <...>`
3737
2. Go to `node_modules``react-native-image-picker``ios` ➜ select `RNImagePicker.xcodeproj`
3838
3. Add `RNImagePicker.a` to `Build Phases -> Link Binary With Libraries`
39-
4. For iOS 10+, Add the `NSPhotoLibraryUsageDescription`, `NSCameraUsageDescription`, and `NSMicrophoneUsageDescription` (if allowing video) keys to your `Info.plist` with strings describing why your app needs these permissions. **Note: You will get a SIGABRT crash if you don't complete this step**
39+
4. For iOS 10+, Add the `NSPhotoLibraryUsageDescription`, `NSCameraUsageDescription`, `NSPhotoLibraryAddUsageDescription` and `NSMicrophoneUsageDescription` (if allowing video) keys to your `Info.plist` with strings describing why your app needs these permissions. **Note: You will get a SIGABRT crash if you don't complete this step**
40+
41+
```
42+
<plist version="1.0">
43+
<dict>
44+
...
45+
<key>NSPhotoLibraryUsageDescription</key>
46+
<string>$(PRODUCT_NAME) would like access to your photo gallery</string>
47+
<key>NSCameraUsageDescription</key>
48+
<string>$(PRODUCT_NAME) would like to use your camera</string>
49+
<key>NSPhotoLibraryAddUsageDescription</key>
50+
<string>$(PRODUCT_NAME) would like to save photos to your photo gallery</string>
51+
<key>NSMicrophoneUsageDescription</key>
52+
<string>$(PRODUCT_NAME) would like to your microphone (for videos)</string>
53+
</dict>
54+
</plist>
55+
```
4056
5. Compile and have fun
4157

4258
#### Android

0 commit comments

Comments
 (0)