There is app which installed on a jailbreak iphones. And we've also implemented the APNs feature. So the problem is :
the app got five notifications and the BadgeNumber shows on the icon is five.
then I uninstall the app, and reinstall it.
when the reintsall was done, the BadgeNumber on the icon still shows five.
====>I think when the reinstall was done ,the BadgeNumber should be Zero. Is it right?
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];`
`if(![defaults objectForKey:"firstRun"]){` //first lanuch on this device `self.firstRun = TRUE;` `[defaults setObject:[NSDate date] forKey:"firstRun"];` `}else {` `//had once launched on this device before` `self.firstRun = FALSE;` }` `[[NSUserDefaults standardUserDefaults] synchronize];` – AlexQu Jul 09 '12 at 08:57