I am using swift 3.0 and am trying to add badge numbers to my app. I believe the correct way to do this is similar to what is below.
application.registerUserNoti
"rawValue" can use | operator.
This code works in swift3, we don't need to do that though.
let types = UIUserNotificationType(rawValue:UIUserNotificationType.alert.rawValue | UIUserNotificationType.sound.rawValue | UIUserNotificationType.badge.rawValue)
application.registerUserNotificationSettings(UIUserNotificationSettings(types: types, categories: nil))