-
Notifications
You must be signed in to change notification settings - Fork 65
Description
First of all @keith, great tool, works flawlessly! 🙏
The only caveat is that it only work directly in Terminal. If it's being called from any other application you get the "You need to grant reminders access" error generated by the app.
I've looked at #58 (it was solved through Apple Script: is too hacky for my purpose), #13 but that discussion is stale, #4 is related but too much on a programmatic level.
My request is that this app is usable by other apps than the terminal.
My assumption is that the code
`public static func requestAccess() -> Bool {
let semaphore = DispatchSemaphore(value: 0)
var grantedAccess = false
Store.requestAccess(to: .reminder) { granted, _ in
grantedAccess = granted
semaphore.signal()
}
semaphore.wait()
return grantedAccess
}
`
works in the terminal and indeed requests access to Reminders, which you can later see here:

Maybe the code can be improved to work also when being called by other apps, and in this way asks permission to the user to grant the current app permission to access Reminders, so it will show up in the list above.
(Not a Swift programmer so there are some big assumptions I made 😅)
Thanks again for your great work 💪