从 PHP 发送推送通知时主键错误

发布于 2024-12-05 10:29:29 字数 387 浏览 6 评论 0原文

我开发了一个使用 APNS 的简单应用程序。该应用程序运行良好,当我使用我的 php 主机时会收到通知,但当我将带有证书的 php 代码发送给另一个国家/地区的人时,它不会收到通知。然后,他在其一侧执行 apns php 代码,但 iPhone 应用程序没有收到任何通知。它在 php 代码中给出主键错误。

我已遵循本教程 http://www.raywenderlich。 com/3443/apple-push-notification-services-tutorial-part-12

请帮忙。

I have developed a simple application that uses APNS. The app runs fine and receives notifications when i used my host for php but its not receiving Notifications when i send the php code with certificate to a person who is in another country. he then executes the apns php code on its side but the iPhone app does not receive any Notifications. Its giving error of primary key in php code.

I have followed this tutorial http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12

Please help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

┼── 2024-12-12 10:29:29

要在另一台服务器上使用您的证书,您应该导入您的私钥并将其安装在该服务器上。如果未安装,则第二台服务器无法使用您用于连接到 APNS 的证书。

我想,你已经忘记这样做了。

To use your certificate on another server you should import your private key and install it on that server. If it won't be installed then second server couldn't use certificate that you are using to connect to APNS.

I think, you have forgotten to do this.

巷雨优美回忆 2024-12-12 10:29:29

我用过 Boxed Ice 的精彩指南将引导您导出证书和私钥,并将其转换为 PHP 可用于与 APNS 通信的格式。它工作完美。

I've used Boxed Ice's awesome guide which walks you through exporting your certificate and private key and getting it into a format that PHP can use to communicate with APNS. It works perfectly.

梦在深巷 2024-12-12 10:29:29

您的 pem 文件也包含私钥吗?

Does your pem file contain private key as well?

演出会有结束 2024-12-12 10:29:29

我已经找到了问题的解决方案,这是密码短语的问题。在服务器端,我们必须在将 .pem 文件添加到服务器时输入密码。

I have figured out the solution of my problem, its was the issue of pass phrase. On server side we have to enter the pass phrase while adding .pem file to server.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文