Apns php错误“无法连接到APNS:110连接超时。”

我从这个Apns代码完成了php和objective c的代码

并从此链接设置证书

沙箱和生产apns发送通知到ios设备完美地工作在我的server.I移动代码和相同的证书到客户端服务器,然后发送通知不起作用。

我debugging所有的PHP代码,发现它停在这行代码

private function _connectSSLSocket($development) { $ctx = stream_context_create(); stream_context_set_option($ctx, 'ssl', 'local_cert', $this->apnsData[$development]['certificate']); $this->sslStreams[$development] = stream_socket_client($this->apnsData[$development]['ssl'], $error, $errorString, 100, (STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT), $ctx); if(!$this->sslStreams[$development]){ $this->_triggerError("Failed to connect to APNS: {$error} {$errorString}."); unset($this->sslStreams[$development]); return false; } return $this->sslStreams[$development]; } 

apns.log文件显示错误“无法连接到APNS:110连接超时。

没有得到错误。 为什么这个错误是我得到,而不是发送通知到iOS设备? 任何人都可以指导我吗?

最后我采取了vps而不是共享主机。 Lucabro的评论帮助我解决了这个问题。 感谢Lucabro。