Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
let notificationCenter = NSUserNotificationCenter.defaultUserNotificationCenter()
let notification = NSUserNotification()
notification.title = "Hello"
notification.informativeText = "This is a test"
notification.soundName = NSUserNotificationDefaultSoundName
notification.userInfo = ["key": "value"]
notificationCenter.deliverNotification(notification)
print("Done")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.