如何在我们的应用程序在iOS中卸载得到通知 [英] How to get notified when our app is uninstalled in iOS

查看:641
本文介绍了如何在我们的应用程序在iOS中卸载得到通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发一个iPhone应用程序,允许用户在没有当目标用户已经安装了我们的应用程序或SMS发送消息通过苹果推送通知服务等。

We are developing an iPhone application that allow users to send messages to others via Apple Push Notification Service when the target user have installed our application or SMS when haven't.

我们希望得到立即通知当我们的应用程序卸载,这样我们就可以决定如何将消息发送给目标用户。

We want to get notified immediately when our app is uninstalled so that we can decide how to send the message to the target user.

我们找到APNS反馈服务器有很长的时间延迟,这并不符合我们的要求一致。因此,我们用另外一种方式:在记录我们的服务器的目标用户已经安装了应用程序,我们通过APNS给他发信息,如果他没有在30分钟内阅读邮件,我们相信他已经卸载应用程序,所以我们派通过SMS消息。

We find the APNS feedback server have a long time delay that doesn't agree with our requirement. So we use another way: when our server recorded the target user have installed our application, we send him message via APNS, if he haven't read the message in 30 minutes, we believe that he has uninstalled the application, so we send the message via SMS.

有什么办法更好?

推荐答案

由于奥列格说,没有办法,如果你的应用程序卸载准确地检测。

As Oleg said, there is no way to accurately detect if your app was uninstalled.

该APNS反馈服务返回的时间戳和推令牌的消息是无法交付。有时,这表示一个卸载,但它也可以简单地表明,在那个时刻只是离线是一个用户。反馈服务确实有一定的滞后性,因此无法用于对时间敏感的英特尔聚会。

The APNS feedback service returns a timestamp and a push token for messages it was not able to deliver. Sometimes, this indicates an uninstallation but it can also simply indicate a user that was simply offline at that moment. The Feedback service does have some lag so can not be used for time-sensitive intel gathering.

根据您的要求,我会说你这样做是正确的。

Based on your requirements, I'd say you're doing it right.

一个建议,可能会或可能不会为你工作将包括一个链接(通过URL处理),以您的应用程序,当你采取发送短信。如果是有意义的用户返回到您的应用程序,点击该链接就应启动的应用程序,你就会有你的服务器上的痕迹,如果你做一个简单的电话。然而,如果在发送用户不会检测为回来进入该应用的短信后,机会是很可能该应用程序确实卸载或该用户是离线特别长的时间量,这可能需要一些其它类型的你的一部分行动。

One suggestion that may or may not work for you would be to include a link (via url handler) to your app when you resort to sending an SMS. If it makes sense for the user to return to your app, clicking on that link should launch the app and you'll have a trace on your server if you make a simple call. If, however, after sending the SMS the user is not detected as coming back into the app, chances are highly likely that the app was indeed uninstalled or that the user is offline for an unusually long amount of time which may require some other type of action on your part.

这篇关于如何在我们的应用程序在iOS中卸载得到通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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