- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这个问题google了一下,搞得我一头雾水。 iOS 中的每个应用是否都具有相同的 DeviceToken
?
这是关于这个问题的 Apple 文档
。
A device token is an opaque NSData instance that contains a unique identifier assigned by Apple to a specific app on a specific device. Only APNs can decode and read the contents of a device token. Each app instance receives its unique device token when it registers with APNs, and must then forward the token to its provider, as described in Configuring Remote Notification Support. The provider must include the device token in each push notification request that targets the associated device; APNs uses the device token to ensure the notification is delivered only to the unique app-device combination for which it is intended.
最佳答案
不,每个应用程序都会获得自己的设备 token 。
另请注意,分配给应用程序/设备的设备 token 可能并且确实会不时更改,这就是为什么您始终需要将更新版本发送到您的推送服务器和/或任何其他可能使用设备 token 。
关于“不时”更改设备 token 的一些说明:
“不时”的意思是“有时,但不经常”
取自 Apple Documentation :
Never cache device tokens in your app; instead, get them from the system when you need them. APNs issues a new device token to your app when certain events happen. The device token is guaranteed to be different, for example, when a user restores a device from a backup, when the user installs your app on a new device, and when the user reinstalls the operating system.
关于ios - iOS 中的每个应用程序都具有相同的 deviceToken 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49005358/
我遇到了一些奇怪的问题。实际上 viewController 的 ViewDidLoad 方法在 AppDelegate 的 didRegisterForRemoteNotificationsWith
我想将我在Parse 中的deviceToken 保存到我的数据库 中的User 和我的休息API。 但是,当我尝试在我的 Android 代码 中获取 deviceToken 时它看起来像这样: 0
我正在尝试为 1 个设备生成设备 token ,但为什么没有为其他设备生成它。我将该值存储在解析中,第二个设备 token 丢失。 为其他设备生成设备 token 的解决方案是什么? 最佳答案 如果您
我正在尝试在 android 中使用解析来推送通知,我在 Application 类中注册解析,如下所示: @Override public void onCreate() { super.o
当用户在应用程序处于后台时从设置中手动启用推送通知 token 时,有没有办法获取推送通知 token 。Swift 中是否有一个函数可以在用户返回应用程序时获取推送通知 token 。 最佳答案 当
我需要获取 deviceToken。当我向我的应用程序添加推送通知时,我通过 didRegisterForRemoteNotificationsWithDeviceToken 收到了 deviceTo
我正在尝试将我的 DeviceToken 移动到我的数据库,这是我尝试过的: 我的 AppDelegate 中有代码: -(void)application:(UIApplication *)appl
我以这种方式通过 Parse 注册推送通知: func application(application: UIApplication, didFinishLaunchingWithOptions la
目前我有很多空的 deviceToken 字段。我发现这是因为在创建安装对象之前添加组存在问题 - 它会阻止后续的创建工作。 我现在想做的是再次获取该 deviceToken 并在 Parse 中更新
我制作了一个提供推送通知的应用程序。 devicetoken 更新存在问题。当用户在安装应用程序后立即授予推送通知权限时,将更新 devicetoken。但是如果用户在安装App后拒绝权限,后来在设置
我收到了 3 个内容相同的推送通知。一开始我想我收到了重复的推送通知。 但是我发现这个推送通知是由不同的deviceToken发送的。 可能是我用Xcode重新安装app的时候出了问题,所以APNS没
我已经完成了获取设备 token 并将其存储在 userdefaults 中的过程。第一次登录时它工作得很好。当用户注销并再次登录时,设备 token 为零。我想在 LoginViewControll
我试图在我的应用程序中实现 Parse,但每次我从 Parse 向我的应用程序发送推送通知时,deviceToken 字段都标记为“未定义”。我按照 Parse 教程中的所有步骤来实现 Parse,但
关闭。这个问题需要details or clarity .它目前不接受答案。 想改进这个问题吗? 通过 editing this post 添加细节并澄清问题. 关闭 9 年前。 Improve t
我可以在这里获取和使用设备 token : - (void)application:(UIApplication *)application didRegisterForRemoteNotificat
如何在 Objective C 中将数据从一个类发送到另一个类?或者我如何将字符串存储到全局变量中?我主要是一名 JavaScript 开发人员,但在这方面遇到了困难。我记不起足够多的 Obj C 来
我的 iOS 13 设备出现了一些奇怪的问题,我不确定这背后的原因是什么。 我得到一个有效的 APNS token (正常的非 VOIP 推送),我每天用它推送多次。这可以持续 2-7 天。但是在几乎
这个问题google了一下,搞得我一头雾水。 iOS 中的每个应用是否都具有相同的 DeviceToken? 这是关于这个问题的 Apple 文档。 A device token is an opaq
我正在开发一个使用 Parse 发送和接收通知的应用程序。现在的问题是,当我注册安装时,deviceToken 为空(deviceType 和 installationId 不为空)。当此 token
我无法使用解析在安装表中设置设备 token 我正在使用 ParseInstallation installation =ParseInstallation.getCurrentInstallatio
我是一名优秀的程序员,十分优秀!