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
However, I get an error for using '|' in UIUserNotificationSettings
block and will also receive the error "Argument labels (forTypes, categories) do not match any of the available overloads" for UIUserNotificationSettings
if I only have UIUserNotificationType.badge
as the first argument. Did swift 3.0 change the syntax for this statement?