Skip to content

Commit 0df61e5

Browse files
committed
doc: add docs for granular Calendar access
1 parent af8fff6 commit 0df61e5

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ askForContactsAccess().then(status => {
123123
})
124124
```
125125

126-
### `permissions.askForCalendarAccess()`
126+
### `permissions.askForCalendarAccess([accessLevel])`
127+
128+
* `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.
127129

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

@@ -136,6 +138,19 @@ askForCalendarAccess().then(status => {
136138
})
137139
```
138140

141+
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.
142+
143+
```
144+
<key>NSCalendarsWriteOnlyAccessUsageDescription</key>
145+
<string>Your reason for wanting write-only Calendar access</string>
146+
```
147+
148+
```
149+
<key>NSCalendarsFullAccessUsageDescription</key>
150+
<string>Your reason for wanting full Calendar access</string>
151+
```
152+
153+
139154
### `permissions.askForSpeechRecognitionAccess()`
140155

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

0 commit comments

Comments
 (0)