推送通知不起作用
我知道这个问题已经被问过,但我迫切需要答案。
我正在我的应用程序中实现推送通知。 最初一切正常,我收到警报。 但有一天我的证书过期了,我更新了证书并使用了更新的 p12 文件。
我重新生成了 pem 文件。但现在我不再收到警报了。
我认为 p12 文件可能存在一些问题,因此我重新生成了几次。但推送通知不起作用。
请提出解决此问题的建议。 提前致谢。
I know this question has already been asked but I am in urgent need of the answer.
I was implementing push notifications in my app.
Initially everything was working fine and I was getting alerts.
But one day my certificate expired and I renewed the cert and used the updated p12 file.
I regenerated the pem files. But now I stopped getting alerts.
I thought that may be I there could be some issue with p12 files so I regenerated them several times. But push notifications don't work.
Please suggest something to resolve this issue.
Thanx in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可能是您的计算机上发送推送通知的端口已关闭。
检查苹果推送通知指南中指定的端口。
May be the ports for sending the push notification are closed on your machine.
Check with the ports specified in apple push notification guide.
我得到了我的问题的解决方案。
根据苹果文档,有时由于持续连接,设备无法与 APNS 连接。
因此,为此,您需要经常从“设置”应用程序中关闭通知,以便重新与 APNS 建立连接。
希望这可以为陷入这个问题的许多人节省大量时间。
I got the solution for my problem.
According to apple docs sometimes due to impersistent connection the device is not able to connect with APNS.
So for this you need to on-off Notifications from the Settings app frequently so that the connection is regained with APNS.
Hope this saves a lot of time of many people stuck in this issue.