Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't access calendar data using icalbuddy #104

Open
Peeja opened this issue Dec 17, 2019 · 5 comments
Open

Can't access calendar data using icalbuddy #104

Peeja opened this issue Dec 17, 2019 · 5 comments

Comments

@Peeja
Copy link

Peeja commented Dec 17, 2019

I'm trying to use icalBuddy to get the current calendar event (icalBuddy eventsNow), but icalBuddy reports:

error: No calendars.

That's not correct, though, and doesn't match what I get running it from iTerm. That's probably because i'm on Mojave, and when I run it from iTerm (the first time), I'm prompted to allow iTerm to access my calendars, which I've allowed. But when I run it from skhd, I never get prompted, and there doesn't appear to be a way to manually add it.

Is there a trick to enabling this permission for skhd, which I think will fix the problem?

@Peeja
Copy link
Author

Peeja commented Dec 17, 2019

It looks like iTerm had to do some work to support this, and so skhd may need to as well: https://gitlab.com/gnachman/iterm2/issues/6977

@koekeishiya
Copy link
Owner

This is a privilege that the icalBuddy binary should have, and not all the applications that act as a launcher of said binary. As far as I can tell, icalBuddy has not been actively maintained in a long time?

@Peeja
Copy link
Author

Peeja commented Jan 18, 2020

Hmm, that hasn't been my experience with command line apps. Generally, the permissions seem to be based on the "topmost" process. I think the idea is that Apple doesn't want every app that shells out to a tool like icalBuddy to have the same set of permissions, so in this case macOS knows that I'm comfortable using icalBuddy directly, but doesn't want to assume that I'm comfortable with skhd having access to my calendar data.

Notably, running icalBuddy eventsNow from the terminal shows me my events, so icalBuddy itself has the privileges it needs.

@koekeishiya
Copy link
Owner

Looks like the developer of iTerm solved the issue by adding a key with the name NSCalendarsUsageDescription to the applications .plist file. I don't know how that would translate for single binary daemon applications.

@Peeja
Copy link
Author

Peeja commented Jan 19, 2020

Yep, looks like imagesnap has similar problems: rharder/imagesnap#26

There are some…interesting hacks in that thread. Nothing seems terribly nice. I'm resorting to running this particular keybinding from Alfred for now, but if anyone comes up with a way to enable this for skhd, I'd much rather keep it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants