You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-18Lines changed: 14 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,10 +59,9 @@ for (const type of types) {
59
59
}
60
60
```
61
61
62
-
## `permissions.askForContactsAccess(callback)`
62
+
## `permissions.askForContactsAccess()`
63
63
64
-
*`callback` Function
65
-
*`status` String - Whether or not the request succeeded or failed; can be `authorized` or `denied`.
64
+
Returns `Promise<String>` - Whether or not the request succeeded or failed; can be `authorized` or `denied`.
66
65
67
66
Your app’s `Info.plist` file must provide a value for the `NSContactsUsageDescription` key that explains to the user why your app is requesting Contacts access.
68
67
@@ -71,41 +70,39 @@ Your app’s `Info.plist` file must provide a value for the `NSContactsUsageDesc
71
70
<string>Your reason for wanting to access the Contact store</string>
72
71
```
73
72
74
-
**Note:**`status` will be called back as `authorized` prior to macOS 10.11, as access to contacts was unilaterally allowed until that version.
73
+
**Note:**`status` will be resolved back as `authorized` prior to macOS 10.11, as access to contacts was unilaterally allowed until that version.
*`type` String - The type of media to which you are requesting access. Can be `microphone` or `camera`.
127
124
128
-
*`callback` Function
129
-
*`status` String - Whether or not the request succeeded or failed; can be `authorized` or `denied`.
125
+
Returns `Promise<String>` - Whether or not the request succeeded or failed; can be `authorized` or `denied`.
130
126
131
127
Your app must provide an explanation for its use of capture devices using the `NSCameraUsageDescription` or `NSMicrophoneUsageDescription``Info.plist` keys; Calling this method or attempting to start a capture session without a usage description raises an exception.
132
128
@@ -137,14 +133,14 @@ Your app must provide an explanation for its use of capture devices using the `N
137
133
<string>Your reason for wanting to access the Microphone</string>
138
134
```
139
135
140
-
**Note:**`status` will be called back as `authorized` prior to macOS 10.14 High Sierra, as access to the camera and microphone was unilaterally allowed until that version.
136
+
**Note:**`status` will be resolved back as `authorized` prior to macOS 10.14 High Sierra, as access to the camera and microphone was unilaterally allowed until that version.
0 commit comments