Skip to content

Commit dab4fe1

Browse files
committed
docs: update askForMusicLibraryAccess description
1 parent 92650e7 commit dab4fe1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,21 @@ askForMicrophoneAccess().then(status => {
260260

261261
Returns `Promise<String>` - Whether or not the request succeeded or failed; can be `authorized` or `denied`.
262262

263+
* `not determined` - The Music Library access authorization will prompt the user to authorize or deny. The Promise is resolved after the user selection with either `authorized` or `denied`.
264+
* `denied` - The `Security & Privacy` System Preferences window is opened with the Music Library privacy key highlighted. On open of the `Security & Privacy` window, the Promise is resolved as `denied`.
265+
* `restricted` - The Promise is resolved as `restricted`.
266+
267+
Your app must provide an explanation for its use of the music library using the `NSAppleMusicUsageDescription` `Info.plist` key.
268+
269+
```
270+
<key>NSAppleMusicUsageDescription</key>
271+
<string>Your reason for wanting to access the user’s media library.</string>
272+
```
273+
274+
**Note:**
275+
276+
- `status` will be resolved back as `authorized` prior to macOS 11.0, as the underlying API was not introduced until that version.
277+
263278
Example:
264279
```js
265280
const { askForMusicLibraryAccess } = require('node-mac-permissions')

0 commit comments

Comments
 (0)