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 know the following code deletes all notifications
[[UIApplication sharedApplication] cancelAllLocalNotifications];
But where do I put that code so that it executes when the application is deleted?
Or any other way to solve this problem.