The UIApplication badge number is not deleted at reinstall.
In case I uninstall the application when the badge has a non zero value, and then re-install it, the badge still appears in the new installation.
I update the badge number in the following manner:
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:badgeNumber];
Tried to find a solution - some notification when the application terminates so I can remove the badge... Couldn't make it with applicationWillTerminate. Any suggestions?
The iOS badge count displays the number of unread notifications within your application, taking the form of a red circle in the upper-right hand corner of the app icon. In recent years, badging has come to be an effective means for re-engaging app users.
Step 1: Launch the Settings app on your iPhone or iPad. Step 2: Tap Home screen. Step 3: In the Notification badges section, toggle on the switch for Show in App Library. Step 4: If seeing the badge in your App Library is preferable, just switch the toggle back on for the full effect.
Badge Count reflects all unread mail from your mail account(s), or just unread mail in your Focused Inbox.
Apple actually responded and this is the expected behavior, the badge remains for a short period after uninstall (exactly for the case of an immediate re-install).
Try to set:
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:-1];
in application: didFinishLaunchingWithOptions:
Worked fine for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With