Browse Source

Merge branch 'master' of https://github.com/joshblour/react-native-permissions

* 'master' of https://github.com/joshblour/react-native-permissions:
  Fix podspec by excluding Example
  Update README.md
  Update Readme (>= RN 0.29 for android)
  Update README.md
Yonah Forst 8 years ago
parent
commit
c1e8f61548
2 changed files with 8 additions and 4 deletions
  1. 7
    4
      README.md
  2. 1
    0
      ReactNativePermissions.podspec

+ 7
- 4
README.md View File

83
 | Return value | Notes|
83
 | Return value | Notes|
84
 |---|---|
84
 |---|---|
85
 |`authorized`| user has authorized this permission |
85
 |`authorized`| user has authorized this permission |
86
-|`denied`| user has denied permissions at least once. On iOS this means that the user will not be prompted again. Android users can be promted multiple times until they select 'Never ask me again'|
87
-|`restricted`| iOS only|
86
+|`denied`| user has denied this permission at least once. On iOS this means that the user will not be prompted again. Android users can be promted multiple times until they select 'Never ask me again'|
87
+|`restricted`| *(iOS only)* user is not able to grant this permission, either because it's not supported by the device or because it has been blocked by parental controls. |
88
 |`undetermined`| user has not yet been prompted with a permission dialog |
88
 |`undetermined`| user has not yet been prompted with a permission dialog |
89
 
89
 
90
 ###Supported permission types
90
 ###Supported permission types
106
 | Method Name | Arguments | Notes
106
 | Method Name | Arguments | Notes
107
 |---|---|---|
107
 |---|---|---|
108
 | `getPermissionStatus` | `type` | - Returns a promise with the permission status. Note: for type `location`, iOS `AuthorizedAlways` and `AuthorizedWhenInUse` both return `authorized` |
108
 | `getPermissionStatus` | `type` | - Returns a promise with the permission status. Note: for type `location`, iOS `AuthorizedAlways` and `AuthorizedWhenInUse` both return `authorized` |
109
-| `requestPermission` | `type` | - Accepts any permission type except `backgroundRefresh`. If the current status is `undetermined`, shows the permission dialog and returns a promise with the resulting status. Otherwise, immediately return a promise with the current status. Note: see below for special cases|
109
+| `requestPermission` | `type` | - Accepts any permission type except `backgroundRefresh`. If the current status is `undetermined`, shows the permission dialog and returns a promise with the resulting status. Otherwise, immediately return a promise with the current status. See iOS Notes for special cases|
110
 | `checkMultiplePermissions` | `[types]` | - Accepts an array of permission types and returns a promise with an object mapping permission types to statuses |
110
 | `checkMultiplePermissions` | `[types]` | - Accepts an array of permission types and returns a promise with an object mapping permission types to statuses |
111
 | `getPermissionTypes` | *none* | - Returns an array of valid permission types  |
111
 | `getPermissionTypes` | *none* | - Returns an array of valid permission types  |
112
 | `openSettings` | *none* | - Switches the user to the settings page of your app (iOS 8.0 and later)  |
112
 | `openSettings` | *none* | - Switches the user to the settings page of your app (iOS 8.0 and later)  |
132
 ```
132
 ```
133
 
133
 
134
 ###Android Notes
134
 ###Android Notes
135
+
136
+Requires RN >= 0.29.0
137
+
135
 All required permissions also need to be included in the Manifest before they can be requested. Otherwise `requestPermission` will immediately return `denied`.
138
 All required permissions also need to be included in the Manifest before they can be requested. Otherwise `requestPermission` will immediately return `denied`.
136
 
139
 
137
 Permissions are automatically accepted for targetSdkVersion < 23 but you can still use `getPermissionStatus` to check if the user has disabled them from Settings.
140
 Permissions are automatically accepted for targetSdkVersion < 23 but you can still use `getPermissionStatus` to check if the user has disabled them from Settings.
200
 
203
 
201
     ...
204
     ...
202
 }
205
 }
203
-```
206
+```

+ 1
- 0
ReactNativePermissions.podspec View File

19
 
19
 
20
   s.preserve_paths      = 'docs', 'CHANGELOG.md', 'LICENSE', 'package.json', 'ReactNativePermissions.ios.js'
20
   s.preserve_paths      = 'docs', 'CHANGELOG.md', 'LICENSE', 'package.json', 'ReactNativePermissions.ios.js'
21
   s.source_files        = '**/*.{h,m}'
21
   s.source_files        = '**/*.{h,m}'
22
+  s.exclude_files       = 'Example/**/*'
22
 end
23
 end