-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix permissions on macOS Sonoma (#70)
The old API now fails 100% of the time and you have to use the new API. This also starts printing the returned error in this case for the future.
- Loading branch information
Showing
3 changed files
with
26 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
import Darwin | ||
import RemindersLibrary | ||
|
||
if Reminders.requestAccess() { | ||
switch Reminders.requestAccess() { | ||
case (true, _): | ||
CLI.main() | ||
} else { | ||
print("You need to grant reminders access") | ||
case (false, let error): | ||
print("error: you need to grant reminders access") | ||
if let error { | ||
print("error: \(error.localizedDescription)") | ||
} | ||
exit(1) | ||
} |