Let\'s say I set 5 local notification for an iPhone application, then the user deletes the app. If the app is installed again, it shows the previous notifications.
I kno
Here's what I did:
In Your AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
//Check if its first time
if (![[NSUserDefaults standardUserDefaults] objectForKey:@"is_first_time"]) {
[application cancelAllLocalNotifications]; // Restart the Local Notifications list
[[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithBool:YES] forKey:@"is_first_time"];
}
return YES;
}
Hope it helps!