Skip to content

Commit 8f481d0

Browse files
committed
docs: fix missing FDA access description
1 parent b122a2b commit 8f481d0

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ Return Value Descriptions:
2828
* 'denied' - The user explicitly denied access to `type` data for the application.
2929
* 'authorized' - The application is authorized to access `type` data.
3030

31-
**Note:** Access to 'contacts' will always return a status of 'Authorized' prior to macOS 10.13 High Sierra, as access to contacts was unilaterally allowed until that version.
31+
**Notes:**
32+
* Access to 'contacts' will always return a status of 'Authorized' prior to macOS 10.11, as access to contacts was unilaterally allowed until that version.
33+
* Access to 'camera' and 'microphone' will always return a status of 'Authorized' prior to macOS 10.14, as access to contacts was unilaterally allowed until that version.
3234

3335
## `permissions.askForContactsAccess(callback)`
3436

@@ -43,6 +45,9 @@ Your app’s `Info.plist` file must provide a value for the `NSContactsUsageDesc
4345
<string>Your reason for wanting to access the Contact store</string>
4446
```
4547

48+
**Note:** `status` will be called back as 'authorized' prior to macOS 10.11, as access to contacts was unilaterally allowed until that version.
49+
50+
Example:
4651
```js
4752
const { askForContactsAccess } = require('node-mac-permissions')
4853

@@ -58,6 +63,7 @@ askForContactsAccess((err, status) => {
5863
* `error` String | null - An error in performing the request, if one occurred.
5964
* `status` String - Whether or not the request succeeded or failed; can be 'authorized' or 'denied'.
6065

66+
Example:
6167
```js
6268
const { askForCalendarAccess } = require('node-mac-permissions')
6369

@@ -73,6 +79,7 @@ askForCalendarAccess((err, status) => {
7379
* `error` String | null - An error in performing the request, if one occurred.
7480
* `status` String - Whether or not the request succeeded or failed; can be 'authorized' or 'denied'.
7581

82+
Example:
7683
```js
7784
const { askForRemindersAccess } = require('node-mac-permissions')
7885

@@ -84,10 +91,13 @@ askForRemindersAccess((err, status) => {
8491

8592
## `permissions.askForFullDiskAccess()`
8693

94+
There is no API for programmatically requesting Full Disk Access on macOS at this time, and so calling this method will trigger opening of System Preferences at the Full Disk pane of Security and Privacy.
95+
96+
Example:
8797
```js
88-
const { askForFullAccess } = require('node-mac-permissions')
98+
const { askForFullDiskAccess } = require('node-mac-permissions')
8999

90-
askForRemindersAccess()
100+
askForFullDiskAccess()
91101
```
92102

93103
## `permissions.askForMediaAccess(type, callback)`
@@ -107,6 +117,9 @@ Your app must provide an explanation for its use of capture devices using the `N
107117
<string>Your reason for wanting to access the Microphone</string>
108118
```
109119

120+
**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.
121+
122+
Example:
110123
```js
111124
const { askForMediaAccess } = require('node-mac-permissions')
112125

0 commit comments

Comments
 (0)