gpt4 book ai didi

android - 推送通知, token 过期?

转载 作者:塔克拉玛干 更新时间:2023-11-02 10:04:36 35 4
gpt4 key购买 nike

我正在开发一个移动应用程序,我正在使用推送通知。

我可以从手机(苹果或安卓)获取 token 以发送推送,但我有一个问题:

这个标记总是一样的?如果一次获得 token ,我需要检查 token 是否更改?

最佳答案

来自苹果文档,

The form of this phase of token trust ensures that only APNs generates the token which it will later honor, and it can assure itself that a token handed to it by a device is the same token that it previously provisioned for that particular device—and only for that device.

If the user restores backup data to a new device or reinstalls the operating system, the device token changes.

因此,使用从 APN 收到的 token 更新服务器总是好的。作为优化的一部分,如果您收到相同的 token ,则无需更新服务器。

关于android - 推送通知, token 过期?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24244085/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com