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.registerUserNotificationSettings(UIUserNotificationSettings(forTypes: UIUserNotificationType.Sound | UIUserNotificationType.Alert |
UIUserNotificationType.Badge, categories: nil
application.applicationIconBadgeNumber = 5
It has been updated in both Swift 2 and Swift 3. This line should fix your issue. Also make sure any other lines with UIUserNotificationType have had their variables switched to lowercase.
let settings = UIUserNotificationSettings(types: [.alert, .badge, .sound], categories: nil)