let types: UIUserNotificationType = [.alert, .sound, .badge, .none]
let settings = UIUserNotificationSettings(forTypes: types, categories: nil)
application.registerUserNotificationSettings(settings)
or this code:
guard let settings = UIApplication.sharedApplication().currentUserNotificationSettings() where settings.types != .None else {}
not sure how to make sense of it, obviously if you register for it, then you would have it among your settings types...
I've read here and here but can't figure it out. Couldn't find documentation on it either. Though, when I Command + Click on it says:
the application may not present any UI upon a notification being received
Is it used to signify that once the notification is received the user can do nothing? How is that something that we should register for?! What can go wrong if we don't register for this?