I'm setting my applicationIconBadgeNumber using this code:
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:theIntToDisplay];
The problem is that when I delete the app from an iPad and reinstall it, the app icon still shows the previous badge number. Is this default iOS behavior or can we reset it?
I found one similar question on at Why the applicationIconBadgeNumber is not getting deleted with appliccation ? Where it stored actually?, but it didn't answer my question.
To solve the iPhone or iPad cannot be restored problem, you can follow 5 solutions below to get detailed information. Way 1. Restore and update iPad with best alternative to iTunes Way 2. Perform a Force Restart When You Can't Restore iPad Way 3. Check Wi-Fi Condition or Reset Network Settings to Fix an iPad That Can't Connect to Wi-Fi Way 4.
After getting iPad into the DFU or Recovery mode, you will see you are going to the model information checking interface. Just click the "Back" option and select "Advanced Mode" and "Confirm" button to start to download the firmware and restore your iPad to factory settings. Moreover, this software also can help you the following issues:
Actually, these iPhone or iPad errors also represent different meanings. Step 1. Press and hold Home button and Power button at the same time. Step 2. Continue holding two buttons until the Apple logo appears. Step 3. Wait and reboot your iPad successfully. Way 3.
A restart is sometimes called a reset. A hard reset is used when the standard restart process doesn't work. To hard reset, hold down the home and on/off buttons at the same time, even after the slider appears. This article explains how to restart an iPad and how to hard reset an iPad. It covers every iPad model ever released.
This is an expected behavior, the badge number remains for a short period after uninstall e.g for the case of an immediate re-install.
Of course you can nullify badge number after every launching the application in application:didFinishLaunchingWithOptions:
method but I think it is not the case because you want badge number not to be shown right after you install app and not yet launch it. In such a case just wait after removing the application and the badge numbers cache will be cleared by iOS and then install the app again. Unfortunately without jailbreaking the device there is no way to manage badge numbers behavior manually
In your app delegate under:
- (void)applicationWillEnterForeground:(UIApplication *)application
{
}
Insert:
application.applicationIconBadgeNumber = 0;
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