如何判断 Apple 推送通知服务 APNS 是否处于活动状态
我们正在测试一个具有 APNS 的应用程序,并注意到有时沙箱环境的 APNS 服务会停止“推送”。 苹果服务器成功接收消息,没有错误。 反馈服务也没有传入消息(我们已成功收到其他事情的反馈)。 我们此功能的代码库已经有一段时间没有改变了,而且一直运行得非常稳定。
我的问题是,Apple 是否可以发送某种 ping 来让我们知道沙箱 APNS 处于活动状态并正在运行?
谢谢。
We are testing an application that has APNS and have noticed that sometimes the APNS service for the sandbox environment stops "pushing". The message is successfully received by the apple server, no errors. There are no incoming messages from the feedback service either (we have successfully received feedback on other things). Our codebase for this feature has not changed in a while and has been working rock solid.
My question is, does Apple have some kind of ping that we can send to let us know that the sandbox APNS is alive and working?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
AFAIK,判断服务是否无法正常工作的唯一方法是您的套接字连接是否有问题。
在测试中,我确实发现我的 deviceId 有一次不正确,导致我无法接收消息。
另外,并不是所有的消息传递都得到保证,我相信只有最后发送的消息是得到保证的。 您是否收到来自批次的任何消息?
最后一个问题是您正在测试的设备类型,iPod Touch 不会像 iPhone 那样受到推动。
如果您这边的一切都检查完毕,也许您应该向苹果提交错误报告/功能请求。 Apple Bug Reporter 从苹果开发者论坛来看,这是一个非常需要的功能。
AFAIK, the only way to tell if the service is not working is if your socket connection has issues.
In testing I did find that my deviceId was incorrect at one point and was preventing me from receiving the messages.
Also, not all message delivery is guaranteed, I believe that only the last one sent is guaranteed. Are you receiving any messages from the batch?
The last question would be the type of device that you are testing with, iPod Touches don't get a push the same way that the iPhone does.
If everything on your side checks out maybe you should file a bug report/feature request with apple. Apple Bug Reporter From the apple dev forums it seems like this is a much requested feature.
我尝试了以下代码(PHP)
回复已建立连接
正在发送消息 :�� d^÷Îå0ZCd%1äuwOOYš'ÊÈ}ârðm⁄Í�,{"aps":{"\u2019alert\u2019":"测试消息"}}
发送有效负载:{“aps”:{“\u2019alert\u2019”:“测试消息”}}
但无法获得通知
任何帮助?
i tried the following code (PHP)
reply is Connection Established
sending message :�� d^÷Îå0ZCd%1ÄuwOOYš'ÊÈ}ârðm¾Í�,{"aps":{"\u2019alert\u2019":"test message"}}
sending payload :{"aps":{"\u2019alert\u2019":"test message"}}
But am not able to get the notification
any help?