ios - Apple 推送通知服务设备 token

标签 ios apple-push-notifications

我在我的应用程序中使用了苹果推送通知服务。我知道从 Apple 服务器发送的设备 token 对于设备是唯一的。如果我卸载我的应用程序并再次安装它注册推送服务,对于同一应用程序的该设备,该设备 token 是否会保持不变? Apple 如何为设备生成设备 token ?

最佳答案

引自Apples Local and Push Notification Programming Guide

By requesting the device token and passing it to the provider every time your application launches, you help to ensure that the provider has the current token for the device. If a user restores a backup to a device other than the one that the backup was created for (for example, the user migrates data to a new device), he or she must launch the application at least once for it to receive notifications again. If the user restores backup data to a new device or reinstalls the operating system, the device token changes. Moreover, never cache a device token and give that to your provider; always get the token from the system whenever you need it

关于ios - Apple 推送通知服务设备 token ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16827665/

相关文章:

ios - for 循环中的异步任务

ios - 什么是 [__NSCFString base64String] : unrecognized selector sent to instance?

ios - 来自 UIStoryboardSegueTemplate 的目标 ViewController

sockets - Apple 推送通知和端口 2195

ios - Apple 推送通知 (APN) - 何时使用沙箱和生产?

ios - APNS : Sending the same notification more than once

ios - 如何在 Swift 中设置推送通知

iphone - 如何运行Three20单元测试?

objective-c - 尝试加载有关方向更改的新 View

push-notification - 根据新的 API,APNS 反馈服务是否不再存在?