我是一名iphone开发者,我正在尝试推送通知。我创建了证书,临时配置文件和php script.And我尝试在终端上运行,然后它工作nice.But当我上传到我的服务器上,通知有时来主要它显示以下错误
警告: stream_socket_client()函数.stream-socket-client:无法连接到ssl://gateway.sandbox.push.apple.com:2195 (连接被拒绝)连接失败: 111连接被拒绝我将ck.pem文件放在与php文件相同的目录中。是否需要添加路径?
发布于 2014-01-24 12:50:55
在推送通知期间,你似乎失去了连接,是的,你应该添加路径,确保你使用的端口是正确的和开放的。
发布于 2014-01-24 13:25:55
还要注意,推送通知也不总是有保证的。你可以参考https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/WhatAreRemoteNotif.html中的“更多关于推送通知”部分。
Quality of Service
Apple Push Notification Service includes a default Quality of Service (QoS) component that
performs a store-and-forward function. If APNs attempts to deliver a notification but the device
is offline, the QoS stores the notification. It retains only one notification per application
on a device: the last notification received from a provider for that application.
When the offline device later reconnects, the QoS forwards the stored notification to the device.
The QoS retains a notification for a limited period before deleting it.如果设备处于离线状态(关闭或无法访问),则它最多只能接收您在这段时间内尝试发送给应用程序的单个推送通知。
https://stackoverflow.com/questions/21324216
复制相似问题