mirror of
https://github.com/munki/munki.git
synced 2026-01-07 06:59:57 -06:00
Request authorization from UNUserNotificationCenter to display app icon badges. Addresses #1255
This commit is contained in:
@@ -81,6 +81,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
|
||||
// have the statuscontroller register for its own notifications
|
||||
statusController.registerForNotifications()
|
||||
|
||||
// we need to let UNUserNotificationCenter know we
|
||||
// support Dock icon badges
|
||||
let center = UNUserNotificationCenter.current()
|
||||
center.requestAuthorization(options: [.badge], completionHandler: { _, _ in return })
|
||||
|
||||
// user may have launched the app manually, or it may have
|
||||
// been launched by /usr/local/munki/managedsoftwareupdate
|
||||
// to display available updates, or via a munki: URL
|
||||
|
||||
Reference in New Issue
Block a user