ios - 无法连接到 APNS

标签 ios apple-push-notifications apns-php

我们正面临 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/

相关文章:

objective-c - ARC 适用于所有对象?

iphone - UITableView contentInset 使表格 View 除了垂直滚动外还可以水平滚动

ios - 推送通知,是我们只需要设备 token ,还是更多?

firebase - APNs 身份验证 key 是否适用于我的所有应用程序 ID?

php - ApnsPHP-发送推送通知时出错

iphone - 如何在 APNS 中发布推送通知以及如何在 iPhone 中显示通知?

ios - 滑动按钮不会用于远程通知

ios媒体选择器仅显示白屏/卡住

ios - didBeginContact 没有在快速移动的 Sprite 上调用

c# - 证书的 iOS 推送通知 AuthenticationException