有没有办法知道在iOS中删除应用程序的时间? [英] Is there a way to know when an app is deleted in iOS?

查看:213
本文介绍了有没有办法知道在iOS中删除应用程序的时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是:

我在iOS应用程序上安排了一些UILocalNotifications,问题是如果我删除应用程序而不删除与通知关联的对象(并因此从scheduledNotifications数组中删除通知)通知仍然会触发。

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.

虽然我没有经历过它们实际射击(它们会在一周的间隔内重复)但我有证据证明这是因为我在应用程序启动时NSLog the scheduledNotifications数组,即使删除应用程序并重新安装它(数据模型的实体消失了),仍然会显示一些预定的通知。

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 app and reinstalling it (with the entities of the data model gone), still shows some scheduled notifications.

我搜索了UIApplication和UIApplicationDelegate参考在Apple的参考库中,但是我找不到任何方法来知道应用程序是否被删除,如果有,我只会写

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];

所以,有没有办法知道这个?

So, is there a way for knowing this?

提前谢谢你,非常感谢你的帮助。

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

推荐答案

这是4.0中的错误,即使用户删除了应用程序,也会重复本地通知,但至少该错误是Apple在以后的版本中修复的。

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.

这篇关于有没有办法知道在iOS中删除应用程序的时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆