简体   繁体   English

来自php服务器的推送通知未发送到ios

[英]push notification from php server is not sent to ios

I am using a php server that connect via 我正在使用通过连接的PHP服务器

$fp = stream_socket_client(
'ssl://gateway.push.apple.com:2195', $err,
$errstr, 60, STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $ctx);

before submitting my app, I used ssl://gateway.sandbox.push.apple.com and everything worked fine. 在提交我的应用程序之前,我使用了ssl://gateway.sandbox.push.apple.com,并且一切正常。 The push notifications worked normally. 推送通知正常工作。

However, after I submitted my app to appstore and the app was approved, the push notification started to not work. 但是,在将我的应用程序提交到appstore并批准了该应用程序之后,该推送通知开始不起作用。 I have noticed that my .pem file was still development apns so I changed my .pem file in my server to Apple push services certificate and set it in my backend. 我注意到我的.pem文件仍在开发中,因此我将服务器中的.pem文件更改为Apple Push Services证书,并将其设置在后端。 However, the push notification is still not loading. 但是,推送通知仍未加载。

Now, even when I try to do this via development (connecting my phonen to xcode and running it there) the notification will not show up.. Do you guys have any clue on what the problem may be? 现在,即使我尝试通过开发来实现此目的(将我的phonen连接到xcode并在此处运行它)也不会显示通知。.你们对可能是什么问题有任何线索吗?

Make sure you have created the production push notifications certificate in the apple developer portal. 确保您已在Apple开发人员门户中创建了生产推送通知证书。 After that upload the .pem file to your server and replace the credentials and it should work. 之后,将.pem文件上传到您的服务器并替换凭据,它应该可以工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM