From 0df61e58684acc54c6225807eeaf748e48d403a4 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 14 Mar 2024 10:22:04 +0100 Subject: [PATCH] doc: add docs for granular Calendar access --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ac69a8a..cf45dde 100644 --- a/README.md +++ b/README.md @@ -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` - Whether or not the request succeeded or failed; can be `authorized` or `denied`. @@ -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. + +``` +NSCalendarsWriteOnlyAccessUsageDescription +Your reason for wanting write-only Calendar access +``` + +``` +NSCalendarsFullAccessUsageDescription +Your reason for wanting full Calendar access +``` + + ### `permissions.askForSpeechRecognitionAccess()` Returns `Promise` - Whether or not the request succeeded or failed; can be `authorized`, `denied`, or `restricted`.