开发者

Is there a way to know when an app is deleted in iOS?

开发者 https://www.devze.com 2023-02-11 00:48 出处:网络
my problem is this: I have scheduled some UILocalNotifications on an iOS app, the problem is that if I delete the app without deleting the objects associated with the notifications (and consequently

my problem is this:

I have scheduled some UILocalNotifications on an iOS app, the problem is that if I delete the app without deleting the objects associated with the notifications (and consequently removing the notifications from the scheduledNotifications array) the notifications still fire.

Although I have not experienced them actually firing (they are set to repeat within a week's interval) I have evidence of this since I NSLog the scheduledNotifications array at application launch, which even after deleting the a开发者_开发技巧pp and reinstalling it (with the entities of the data model gone), still shows some scheduled notifications.

I've searched the UIApplication and the UIApplicationDelegate reference in Apple's reference library but I found no method to know if the app is being deleted, if there is I would just write

[[UIApplication sharedApplication] cancelAllLocalNotifications];

in said method.

So, is there a way for knowing this?

Thank you in advance, your help is very much appreciated.


This was bug in 4.0 that the local notification was repeated even if the user has deleted the app, but at least that bug was fixed by Apple in later release.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号