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

macOS permission requests fail when run from Android Studio or VScode #8

Closed
lukemmtt opened this issue May 1, 2024 · 1 comment
Closed

Comments

@lukemmtt
Copy link

lukemmtt commented May 1, 2024

I was researching why my macOS Flutter build was having issues when attempting to request and utilize permissions, and I came across a number of valuable resources and open issues. I'm creating an issue here to track the underlying issue—hopefully it might save other users of the reminders plugin some time in troubleshooting in the future.

For what it's worth, my workflow for debugging anything involving Calendar or Reminders macOS permissions right now is:

  1. Launch debug or release build from Android Studio. Permissions will not work at this stage, and any attempt to read permission will return PermissionStatus at the OS level.
  2. Ensure the launcher icon is saved in the dock, then close the app & reopen it by clicking on icon in dock
  3. Permissions work as expected.
@berkobob
Copy link
Owner

I know this works in VS Code but I haven't tried it in Android Studio. Open a terminal within your IDE and run this code:

osascript - title <<END
on run a
tell app "Reminders"
tell list "Reminders" of default account
make new reminder with properties {name:item 1 of a}
end
end
end
END

This will create a reminder and give your IDE permission.

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

No branches or pull requests

2 participants