Skip to content

Commit

Permalink
docs: update askForMusicLibraryAccess description
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Jun 30, 2021
1 parent 92650e7 commit dab4fe1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,21 @@ askForMicrophoneAccess().then(status => {

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

* `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`.
* `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`.
* `restricted` - The Promise is resolved as `restricted`.

Your app must provide an explanation for its use of the music library using the `NSAppleMusicUsageDescription` `Info.plist` key.

```
<key>NSAppleMusicUsageDescription</key>
<string>Your reason for wanting to access the user’s media library.</string>
```

**Note:**

- `status` will be resolved back as `authorized` prior to macOS 11.0, as the underlying API was not introduced until that version.

Example:
```js
const { askForMusicLibraryAccess } = require('node-mac-permissions')
Expand Down

0 comments on commit dab4fe1

Please sign in to comment.