“推送通知" -反馈,卸载应用程序

问题描述:

Apple推送通知-反馈服务

Apple push notification - Feedback Service

您如何知道用户何时卸载您的应用程序?这样您就可以从推送服务器中删除其设备令牌.

How do you know when the user uninstalls your application? so that you can remove their devicetoken from the push server.

您根本不知道.您可以获取可能与同一应用程序令牌字符串相同的设备标识字符串,并跟踪特定设备的令牌是否已更改.因此,您可以使用新的设备令牌来更新设备令牌,但是无法找出您的应用是否已从设备中删除.

You simply don't know. You can grab device identification string which is presumably identical for the same application token string, and track if a token has changed for the specific device. So you can update the device token with a new one, but there is no way to find out if your app was removed from a device.

更新: 你是对的.您可以从反馈服务中获取此信息,但是请注意.您需要至少安装一个启用了推送消息的应用程序,以保持持久的反馈连接.我会将这些客户标记为可能不存在,但不会从客户数据库中删除这些人.谁知道为什么您的推送消息会被拒绝.您的设备可能处于不一致状态,并且您将永久删除您的订户.如果您有1万个僵尸客户端,这对于数据库来说是零花钱.如果您失去了10万名客户,那您将面临比这严重得多的问题.

Update: You are correct. You can get this information from the feedback service, however there is a caveat. You need to have at least one push-messaging enabled application installed to maintain persistent feedback connection. I'd mark these customers as potentially non-existant, but I wouldn't remove these folks from a customer DB. Who knows why your push message can be rejected. Your device may be in inconsistent state and you remove your subscriber forever. If you have 10k zombie clients it is a pocket change for a DB. If you lost 100k clients you have much serious problems than that.