简体   繁体   English

如何在卸载iPhone应用程序时触发事件?

[英]How to fire an event on uninstallation of an iphone app?

卸载iphone应用后,我想从数据库服务中删除所有数据

this can be possible but I dont think there is a very simple way like implementing a method when user removes your app. 这是可能的,但我不认为有一种非常简单的方法,例如当用户删除您的应用时实现一种方法。 you can take a look in APNS Feedback Service , this might help you. 您可以查看APNS反馈服务 ,这可能会对您有所帮助。

If a provider attempts to deliver a push notification to an application, but the application no longer exists on the device, the device reports that fact to Apple Push Notification Service. 如果提供商尝试向应用程序传递推送通知,但是该应用程序在设备上不再存在,则该设备会将该事实报告给Apple推送通知服务。 This situation often happens when the user has uninstalled the application. 用户卸载了应用程序后,通常会发生这种情况。 If a device reports failed-delivery attempts for an application, APNs needs some way to inform the provider so that it can refrain from sending notifications to that device. 如果设备报告了应用程序的传递失败尝试,则APN需要采取某种方式来通知提供商,以便它可以避免向该设备发送通知。 Doing this reduces unnecessary message overhead and improves overall system performance. 这样做可以减少不必要的消息开销,并提高整体系统性能。

For an iOS app, remove option which comes after long pressing on icon is the only 'uninstalling' option which will always remove any stored date of the app from device. 对于iOS应用,长按图标后出现的删除选项是唯一的“卸载”选项,它将始终从设备中删除该应用的所有存储日期。 There will not be any particular event triggered when user does that. 用户这样做时不会触发任何特定事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM