Update AVMonitor.m

launch system prefs (via alert) if OverSight needs notifications
This commit is contained in:
Patrick Wardle 2022-11-21 19:51:13 -10:00
parent 998ecf2b5b
commit b79bcf7da6
1 changed files with 7 additions and 0 deletions

View File

@ -80,6 +80,9 @@ extern os_log_t logHandle;
{
//show alert
showAlert(@"ERROR: OverSight not authorized to display notifications!", @"Please authorize via the \"Notifications\" pane (in System Preferences).");
//open `System Preferences` notifications pane
[NSWorkspace.sharedWorkspace openURL:[NSURL URLWithString:@"x-apple.systempreferences:com.apple.preference.notifications"]];
}
//bg thread
// show alert on main thread
@ -90,6 +93,10 @@ extern os_log_t logHandle;
^{
//show alert
showAlert(@"ERROR: OverSight not authorized to display notifications!", @"Please authorize via the \"Notifications\" pane (in System Preferences).");
//open `System Preferences` notifications pane
[NSWorkspace.sharedWorkspace openURL:[NSURL URLWithString:@"x-apple.systempreferences:com.apple.preference.notifications"]];
});
}
}