3

I am currently making an application that displays a notification to the user, however it does not show the application icon.

Here is my code:

func showNotification(message:String, title:String = "App Name") -> Void {
    let notification = NSUserNotification()
    notification.title = title
    notification.informativeText = message
    NSUserNotificationCenter.defaultUserNotificationCenter().deliverNotification(notification)
}

showNotification("\(song)\n\(artist)",title: "Now Playing")

How would I add my application icon to the notification?

Edit:

Here is my Application Icon Asset:

enter image description here

And here is my notification.

enter image description here

iProgram
  • 6,057
  • 9
  • 39
  • 80

0 Answers0