且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

重新安装后删除iOS推送通知

更新时间:2023-02-21 21:14:22

我想你能做的***的事情就是在没有登录用户的情况下启动应用程序时预防性地取消注册/删除令牌.每次启动应用程序时,您都应该更新注册,因此在每次应用程序启动时注册/取消注册,具体取决于用户是否登录.这样,如果用户重新安装应用并第一次启动它,它就会被注销.

I guess the best thing you can do is to preventively unregister/remove the tokens, when the app is started without a logged in user. You should update the registration anyways each time the app is started, so register/unregister at each app start, depending on if a user is logged in or not. This way, if the user reinstalls the app and starts it the first time, it will be unregistered.

这是您可以实现的***行为,因为 Twitter、Facebook、Skype 等也是如此...

This is the best behaviour you can achieve, as it is the same for Twitter, Facebook, Skype, etc...