8
PHP苹果改变了APN的验证关键P8后到AP,目前的库如https://github.com/immobiliare/ApnsPHP仍然使用旧的PEM和证书文件如何连接使用P8身份验证密钥文件
$push = new ApnsPHP_Push(
ApnsPHP_Abstract::ENVIRONMENT_SANDBOX,
'server_certificates_bundle_sandbox.pem'
);
// Set the Provider Certificate passphrase
// $push->setProviderCertificatePassphrase('test');
// Set the Root Certificate Autority to verify the Apple remote peer
$push->setRootCertificationAuthority('entrust_root_certification_authority.pem');
// Connect to the Apple Push Notification Service
$push->connect()
连接与节点。 JS例子(https://eladnava.com/send-push-notifications-to-ios-devices-using-xcode-8-and-swift-3/),我可以把这样的:
var apnProvider = new apn.Provider({
token: {
key: 'APNsAuthKey_Q34DLF6Z6J.p8', // Path to the key p8 file
keyId: 'Q34DLF6Z6J', // The Key ID of the p8 file (available at https://developer.apple.com/account/ios/certificate/key)
teamId: 'RLAHF6FL89', // The Team ID of your Apple Developer Account (available at https://developer.apple.com/account/#/membership/)
},
production: false // Set to true if sending a notification to a production iOS app
});
如何使用PHP远程通知给iOS就像我在node.js中做什么?
您有解决方案吗? :) – Maximus1809
@ Maximus1809尚未:) – mehmetsen80
我正在寻找一种方法来做到这一点,看起来像我将不得不作出解决 –