我的应用程序推送通知使用设备 token 从 C# 应用程序推送。
一旦用户在设备上卸载应用程序,我想停止推送通知。是的,当然它工作正常。
再次安装相同的应用程序。但是它正在接收以前没有登录的用户通知。
如何解决这个问题?...
我已引用此链接 http://42spikes.com/post/Sending-Apple-Push-Notifications-from-a-C-Application.aspx
我的问题:
1) 是否可以在卸载/安装时调用任何方法? (可能意味着我可以访问 Web 服务并重置设备 token 值吗?)。
2) 安装或卸载时还有其他解决此问题的方法吗?
最佳答案
- 不,当用户卸载您的应用程序时不会触发任何方法。
- 是的, Apple 有一项服务,您可以在其中检查 token 是否仍然存在 有效的。
您要在 C# 应用程序中实现的选项是 The Feedback Service :
The Apple Push Notification Service includes a feedback service to give you information about failed push notifications. When a push notification cannot be delivered because the intended app does not exist on the device, the feedback service adds that device’s token to its list. Push notifications that expire before being delivered are not considered a failed delivery and don’t impact the feedback service. By using this information to stop sending push notifications that will fail to be delivered, you reduce unnecessary message overhead and improve overall system performance.
关于ios - 停止推送通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18077745/