gpt4 book ai didi

php - 某些设备的无效 token

转载 作者:可可西里 更新时间:2023-10-31 23:23:53 26 4
gpt4 key购买 nike

给出:

  • 工作的 iPod 应用程序
  • php 中的服务器端(修改后的 easyapns)。

我在沙盒中发送请求 ssl://gateway.sandbox.push.apple.com:2195如果我向 ssl://gateway.push.apple.com:2195 发送请求,没有错误返回,但通知没有到达。在这种情况下,如果我发送完全错误的设备 token (例如 12345),APNs 仍然不会返回错误。

问题:APN 返回 status_code => 8(对接站的解释:Invalid token)到查询增强型通知格式,并为 5 个设备的 5 个 token 中的 4 个返回错误代码。

我有正确的开发者证书,至少 iPod 的应用程序开发者是这样说的,他们向我发送了该证书。iPod 的应用程序开发人员争辩说应用程序每次都发送正确的开发 token (我不知道如何在没有 mac 和开发人员工具的情况下检查设备 token )。

检查:

  • 服务器2195,2196端口开放
  • 我的 iPod 连接到网络的路由器设置是正确的(并且用于接收的端口 5223 是打开的)- 我在“iPusher”和“iPush 测试”应用程序上进行了测试
  • 连接到 APN 成功
  • 试图从本地机器发送
  • 尝试从 VPS 发送
  • 已检查

最佳答案

当我遇到这个问题时,原来是因为 key 和证书不匹配。尝试使用 openssl 连接:

openssl s_client -connect gateway.sandbox.push.apple.com:2195
-cert cert.pem -key key.pem

直到吐出一堆以“CONNECTED”开头的东西,你才没有正确连接。

关于php - 某些设备的无效 token ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10088095/

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