Iff*_*ffi 6 push-notification apple-push-notifications apns-php
我在IOS设备上遇到推送通知的APNS php代码问题,我有两个独立的开发和生产连接.
网址:'ssl://gateway.sandbox.push.apple.com:2195'
$push = new ApnsPHP_Push(
ApnsPHP_Abstract::ENVIRONMENT_SANDBOX,
'APNS_Dev_ISAS.pem'
);
$myNewLogger = new MyNewLogger();
$push->setLogger($myNewLogger);
// Set the Provider Certificate passphrase
$push->setProviderCertificatePassphrase('1234567');
$push->setRootCertificationAuthority('APNS_Dev_ISAS.pem');
$push->connect();
Run Code Online (Sandbox Code Playgroud)
问题:
网址:ssl://gateway.push.apple.com:2195
$push = new ApnsPHP_Push(
ApnsPHP_Abstract::ENVIRONMENT_PRODUCTION,
'APNS_PROD_ISAS.pem'
);
$myNewLogger = new MyNewLogger();
$push->setLogger($myNewLogger);
// Set the Provider Certificate passphrase
$push->setProviderCertificatePassphrase('12345678');
$push->setRootCertificationAuthority('APNS_PROD_ISAS.pem');
$push->connect();
Run Code Online (Sandbox Code Playgroud)
连接错误: 信息:尝试ssl://gateway.push.apple.com:2195 ...错误:无法连接到'ssl://gateway.push.apple.com:2195':( 0)信息:重试连接(1/3)...信息:尝试ssl://gateway.push.apple.com:2195 ...错误:无法连接到'ssl://gateway.push.apple.com:2195 ':( 0)INFO:重试连接(2/3)...信息:尝试ssl://gateway.push.apple.com:2195 ...错误:无法连接到'ssl://网关. push.apple.com:2195':( 0)信息:重试连接(3/3)...信息:尝试ssl://gateway.push.apple.com:2195 ...错误:无法连接到'ssl://gateway.push.apple.com:2195':( 0)
我谷歌问题,我发现了一些解决方案,我已经检查了一切,一切都很好但没有成功.
真的很感激任何帮助.提前致谢.
我为推送通知创建的证书(.pem)有问题。
解决方案: 经过几天的尝试,我发现创建带有迷你字符密码的证书可能是1234,它将非常适合您并成功连接到IOS推送通知服务器。
也许这会帮助别人。
谢谢。
| 归档时间: |
|
| 查看次数: |
22131 次 |
| 最近记录: |