I am trying to add badge to app icon but simply nothing happens.
UIApplication.sharedApplication().registerUserNotificationSettings(UIUserNotificationSettings(forTypes: UIUserNotificationType.Sound | UIUserNotificationType.Alert | UIUserNotificationType.Badge, categories: nil))
UIApplication.sharedApplication().applicationIconBadgeNumber = 40;
Do I miss something in this code?