Skip to content

How to get access to Reminders in anything else than Terminal #68

@Zjaaspoer

Description

@Zjaaspoer

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:
image

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 💪

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions