gpt4 book ai didi

ios - 基于 token 的 APN 连接错误 400 BadDeviceToken | Apple 推送通知错误

转载 作者:行者123 更新时间:2023-11-29 05:14:03 25 4
gpt4 key购买 nike

我们计划转向 APN 的新的基于 token 的连接来发送通知。 Apple Document.

这支持向同一团队 ID 下的多个应用程序发送通知,无论环境阶段/产品如何。

但奇怪的是,当尝试将 notif 发送到生产应用程序的设备 token 时,它正在工作。而当我尝试向阶段应用程序设备 token 发送 notif 时,它失败并出现错误 400 BadDeviceToken。

最佳答案

从文档中,它提到了以下内容:

For security, APNs requires you to refresh your token regularly. Refresh your token no more than once every 20 minutes and no less than once every 60 minutes. APNs rejects any request whose token contains a timestamp that is more than one hour old. Similarly, APNs reports an error if you recreate your tokens more than once every 20 minutes.

您是否定期刷新您的开发 token ?如果是,请尝试从设备中删除该应用程序并从 Xcode 中重新安装它,如本 LINK 中所述。 .

希望这有助于解决您的问题。

问候,

阿杰

关于ios - 基于 token 的 APN 连接错误 400 BadDeviceToken | Apple 推送通知错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59368875/

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