diff --git a/ocu/calendars/get-calendar-events.applescript b/ocu/calendars/get-calendar-events.applescript index 28e6850..6824c71 100644 --- a/ocu/calendars/get-calendar-events.applescript +++ b/ocu/calendars/get-calendar-events.applescript @@ -182,6 +182,16 @@ on run(listOfCalNames) -- create event store and get the OK to access Calendars set theEKEventStore to current application's EKEventStore's alloc()'s init() + -- trigger request for full access to calendar (this is crucial to ensure + -- that the workflow has calendar access); as of macOS Sonoma, + -- requestAccessToEntityType is deprecated (source: + -- ) + -- because the calendar permissions have become more granular (e.g. "Full + -- Access" vs. "Add Only"); the recommended alternative is to use + -- requestFullAccessToEventsWithCompletion (documentation here: + -- ) + theEKEventStore's requestFullAccessToEventsWithCompletion:(missing value) + -- get calendars that can store events set theCalendars to theEKEventStore's calendarsForEntityType:0 -- filter down to the calendars you want