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
feat: add External Storage Device permission support
Add support for checking and requesting external storage device
authorization via AVExternalStorageDevice, available since macOS 14.0.
New API:
- getAuthStatus('external-storage') - check current authorization
- askForExternalStorageAccess() - request authorization
@@ -39,6 +40,7 @@ This native Node.js module allows you to manage an app's access to:
39
40
- Calendar
40
41
- Camera
41
42
- Contacts
43
+
- External Storage Devices
42
44
- Focus Status
43
45
- Full Disk Access
44
46
- Input Monitoring
@@ -62,7 +64,7 @@ If you're using macOS 12.3 or newer, you'll need to ensure you have Python insta
62
64
63
65
### `permissions.getAuthStatus(type)`
64
66
65
-
-`type` String - The type of system component to which you are requesting access. Can be one of `accessibility`, `bluetooth`, `calendar`, `camera`, `contacts`, `focus-status`, `full-disk-access`, `input-monitoring`, `location`, `microphone`, `notifications`, `photos`, `reminders`, `screen`, or `speech-recognition`.
67
+
-`type` String - The type of system component to which you are requesting access. Can be one of `accessibility`, `bluetooth`, `calendar`, `camera`, `contacts`, `external-storage`, `focus-status`, `full-disk-access`, `input-monitoring`, `location`, `microphone`, `notifications`, `photos`, `reminders`, `screen`, or `speech-recognition`.
66
68
67
69
Returns `String` - Can be one of `not determined`, `denied`, `authorized`, `limited`, `provisional`, or `restricted`.
68
70
@@ -86,6 +88,7 @@ const types = [
86
88
'calendar',
87
89
'camera',
88
90
'contacts',
91
+
'external-storage',
89
92
'focus-status',
90
93
'full-disk-access',
91
94
'input-monitoring',
@@ -240,6 +243,27 @@ requesting Reminders access.
240
243
<string>Your reason for wanting access to read and write Reminders data.</string>
241
244
```
242
245
246
+
### `permissions.askForExternalStorageAccess()`
247
+
248
+
Returns `Promise<String>` - Whether or not the request succeeded or failed; can be `authorized`, `denied`, or `not determined`.
249
+
250
+
Checks the authorization status for capturing onto an external storage device. If the status check returns:
251
+
252
+
-`not determined` - The external storage access authorization will prompt the user to authorize or deny. The Promise is resolved after the user selection with either `authorized` or `denied`.
253
+
-`denied` - The Promise is resolved as `denied`.
254
+
255
+
**Note:** Requires macOS 14.0 or higher. On older versions, the Promise resolves as `not determined`.
0 commit comments