我一直在到处寻找答案,但无济于事。我为客户开发了一个应用程序。这个客户在网上工作,所以他在他的服务器和正常的安全策略上有很好的安全性,其中一个策略是限制来自域的外部连接,所以注册连接的唯一方法是通过特定的 IP 地址。我的问题是负责发送推送通知的框架等待服务器的回答以了解推送通知是否已发送给用户,如果服务器响应超时或响应表示通知未送达,框架会尝试发送该通知再次通知。这个过程被尝试了三次,在第三次之后,框架甚至不再检查交付状态并继续处理其余的通知。问题是苹果响应来自不同的 IP,如果响应的 IP 不是客户端安全策略中注册的 IP 之一,最终用户将收到三个推送通知,而不是一个。
我一直试图通过反复试验获得 IP,但令人沮丧,到目前为止我已经获得了 30 多个不同的 IP。是否有 Apple 用于响应推送通知的 IP 的任何文档?有没有人通过任何其他方式获得 IP 列表?
抱歉发了这么长的帖子。
最佳答案
根据 this来自 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 - Apple 推送通知响应 IP 地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9502506/