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,8 +83,8 @@ Promises resolve into one of these statuses
83 83
 | Return value | Notes|
84 84
 |---|---|
85 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 88
 |`undetermined`| user has not yet been prompted with a permission dialog |
89 89
 
90 90
 ###Supported permission types
@@ -106,7 +106,7 @@ Promises resolve into one of these statuses
106 106
 | Method Name | Arguments | Notes
107 107
 |---|---|---|
108 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 110
 | `checkMultiplePermissions` | `[types]` | - Accepts an array of permission types and returns a promise with an object mapping permission types to statuses |
111 111
 | `getPermissionTypes` | *none* | - Returns an array of valid permission types  |
112 112
 | `openSettings` | *none* | - Switches the user to the settings page of your app (iOS 8.0 and later)  |
@@ -132,6 +132,9 @@ Permission type `bluetooth` represents the status of the `CBPeripheralManager`.
132 132
 ```
133 133
 
134 134
 ###Android Notes
135
+
136
+Requires RN >= 0.29.0
137
+
135 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 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,4 +203,4 @@ public class MainApplication extends Application implements ReactApplication {
200 203
 
201 204
     ...
202 205
 }
203
-```
206
+```

+ 1
- 0
ReactNativePermissions.podspec View File

@@ -19,4 +19,5 @@ Pod::Spec.new do |s|
19 19
 
20 20
   s.preserve_paths      = 'docs', 'CHANGELOG.md', 'LICENSE', 'package.json', 'ReactNativePermissions.ios.js'
21 21
   s.source_files        = '**/*.{h,m}'
22
+  s.exclude_files       = 'Example/**/*'
22 23
 end