Yonah Forst 8 years ago
parent
commit
4a94a298e3
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      README.md

+ 11
- 0
README.md View File

@@ -24,6 +24,8 @@ npm install --save react-native-permissions
24 24
 rnpm link
25 25
 ```
26 26
 
27
+Add permissions to manifest for android and info.plist for ios (xcode >=8). See notes below for more details.
28
+
27 29
 ```js
28 30
 const Permissions = require('react-native-permissions');
29 31
 
@@ -136,6 +138,12 @@ Permission type `bluetooth` represents the status of the `CBPeripheralManager`.
136 138
       })
137 139
 ```
138 140
 
141
+With Xcode 8, you now need to add usage descriptions for each permission you will request. Open Xcode > Info.plist > Add a key (starting with "Privacy - ...") with your kit specific permission.
142
+
143
+Example:
144
+If you need Contacts permission you have to add the key "Privacy - Contacts Usage Description".
145
+<img width="338" alt="3cde3b44-7ffd-11e6-918b-63888e33f983" src="https://cloud.githubusercontent.com/assets/1440796/18713019/271be540-8011-11e6-87fb-c3828c172dfc.png">
146
+
139 147
 ###Android Notes
140 148
 
141 149
 Requires RN >= 0.29.0
@@ -214,3 +222,6 @@ public class MainApplication extends Application implements ReactApplication {
214 222
 
215 223
 #### Q: Android - `undefined is not a object (evaluating 'RNPermissions.requestPermissions')`
216 224
 A: `rnpm` may not have linked correctly. Follow the manual linking steps and make sure the library is linked 
225
+
226
+#### Q: iOS - app crashes as soon as I request permission
227
+A: starting with xcode 8, you need to add permission descriptions. see iOS notes for more details. Thanks to @jesperlndk for discovering this.