iOS9でホームアイコンにバッチが表示されなくなった時の対応方法
検証OS: iOS 9 beta 5
Xcode: Xcode 7 beta 5
対応前
let types: UIUserNotificationType = [.Alert, .Sound] let settings: UIUserNotificationSettings = UIUserNotificationSettings(forTypes: types, categories: nil) UIApplication.sharedApplication().registerUserNotificationSettings(settings)
対応後
let types: UIUserNotificationType = [.Alert, .Sound, .Badge] let settings: UIUserNotificationSettings = UIUserNotificationSettings(forTypes: types, categories: nil) UIApplication.sharedApplication().registerUserNotificationSettings(settings)
iOS 8までは UIUserNotificationType.Badge を指定しなくてもホームアイコンにバッチを表示できていましてが、
iOS 9からは指定しないと表示できないようです。
iOS 8までで表示できていたことの方が疑問です。