My application has an alarm function using UILocalNotification, and it works great. However, if the user uninstalls the application and then REINSTALLS it, he will receive all the βintermediateβ notifications at once.
I tried to call:
[[UIApplication sharedApplication] cancelAllLocalNotifications];
if this is the first time the application is launched, but it does not help, because the notification was received even before the application: the didFinishLaunchingWithOptions method is called:
It was worse in 4.0 when the alarm was repeated even if the user uninstalled the application, but at least this error was fixed by Apple in a later release. However, now I'm stuck with this. Anyone have an idea?
iphone repeat notifications alarm uilocalnotification
Enzo tran
source share