Hey there,
I'd like to ask for guidance on how to open the Apple Calendar app's event programmatically. I can already list events, but I'm struggling to open the calendar detail view (upon user interaction).
I've tried many variants, such as using the x-apple-calevent
URL scheme or calshow:\,
etc., but none of them worked.
Here's the code I'm using:
if let eventIdentifier = event.eventIdentifier as String?,
let calendarId = event.calendarId as String? {
if let url = URL(string: "x-apple-calevent://\(calendarId)/\(eventIdentifier)") {
NSWorkspace.shared.open(url)
}
}
Once the action is triggered, it tells me that:
There is no application set to open the URL
x-apple-calevent://909114A0-6352-47DB-B70E-2770H7D5B6D3:7q50iih7fvbio3qipk5m7osjig@google.com
Thanks a bunch!
Tom