Skip to content

Commit

Permalink
doc: add docs for granular Calendar access
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Mar 14, 2024
1 parent af8fff6 commit 0df61e5
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ askForContactsAccess().then(status => {
})
```

### `permissions.askForCalendarAccess()`
### `permissions.askForCalendarAccess([accessLevel])`

* `accessLevel` String (optional) - The access level being requested of Photos. Can be either `write-only` or `full`. Default is `write-only`. Only available on macOS 14 or higher.

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

Expand All @@ -136,6 +138,19 @@ askForCalendarAccess().then(status => {
})
```

On macOS 14 and newer, your app’s `Info.plist` file must provide a value for either the `NSCalendarsWriteOnlyAccessUsageDescription` key or the `NSCalendarsFullAccessUsageDescription` key that explains to the user why your app is requesting Calendar access.

```
<key>NSCalendarsWriteOnlyAccessUsageDescription</key>
<string>Your reason for wanting write-only Calendar access</string>
```

```
<key>NSCalendarsFullAccessUsageDescription</key>
<string>Your reason for wanting full Calendar access</string>
```


### `permissions.askForSpeechRecognitionAccess()`

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

0 comments on commit 0df61e5

Please sign in to comment.