Hi, dein ViewController muss NSUserNotificationCenterDelegate sein, also z.B.
hier musst func userNotificationCenter(_ center: NSUserNotificationCenter, shouldPresent notification: NSUserNotification) -> Bool {
überschreiben und true zurückliefern.
Dann weist du dem NSUserNotificationCenter den ViewController als Delegate zu.
hier musst func userNotificationCenter(_ center: NSUserNotificationCenter, shouldPresent notification: NSUserNotification) -> Bool {
überschreiben und true zurückliefern.
Dann weist du dem NSUserNotificationCenter den ViewController als Delegate zu.