Comments on: Show notification in cocoa xcode app using Swift 3.0.1 https://nabtron.com/show-notification-cocoa-xcode-swift/ Technology & Programming Guide Sun, 21 Apr 2019 04:51:15 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: Nabtron https://nabtron.com/show-notification-cocoa-xcode-swift/#comment-20205 Sun, 21 Apr 2019 04:51:15 +0000 https://nabtron.com/?p=10336#comment-20205 In reply to Paul Gamble.

Thank you for your code and input :)

]]>
By: Paul Gamble https://nabtron.com/show-notification-cocoa-xcode-swift/#comment-19936 Sat, 29 Jul 2017 18:47:14 +0000 https://nabtron.com/?p=10336#comment-19936 This leaves out the necessary steps of implementing this function to make sure the notification actually displays. Otherwise it only shows up in the notification center.

func userNotificationCenter(_ center: NSUserNotificationCenter, shouldPresent notification: NSUserNotification) -> Bool {
    return true
}

And then when your controller loads:

NSUserNotificationCenter.default.delegate = self

And P.S. – Your adblock blocker only pushes people away from your site or makes them disable Javascript :)

]]>