我们正面临 APNS 的一个奇怪问题。
我们有一个实时应用程序,它能够从 API 域发送推送消息。但我们正准备将其移动到另一台服务器,我们正在使用 IP 而不是域名进行测试。
我们使用相同的设置和代码,但 APNS 总是失败并返回以下错误: 注意:无法连接到 APNS:0。
我们已经彻底检查过,我们在新服务器上打开了 2195 和 2196 端口并安装了 SSL。
谁能告诉我 APNS 是否因为使用 IP 而不是域名而一直失败?
问候, 圣光
最佳答案
Apple 文档说:
The IP address range for the push service is subject to change; the expectation is that providers will connect by hostname rather than IP address. The push service uses a load balancing scheme that yields a different IP address for the same hostname. However, the entire 17.0.0.0/8 address block is assigned to Apple, so you can specify that range in your firewall rules.
关于ios - 无法连接到 APNS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24081217/