을 사용하여 APN에 연결하는 등 https://github.com/immobiliare/ApnsPHP으로 현재 라이브러리는 여전히 노드와어떻게 애플 P8에있는 APN 인증 키를 변경 한 후 PHP는 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()
를 연결하는 기존 PEM 및 인증서 파일을 사용합니다. JS 예 (https://eladnava.com/send-push-notifications-to-ios-devices-using-xcode-8-and-swift-3/), I는 다음과 같이 보낼 수 :
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
});
어떻게 내가 Node.js를에서처럼 아이폰 OS에 원격 알림을 보낼 PHP를 사용할 수 있습니까?
해결책이 있습니까? :) – Maximus1809
@ Maximus1809 아직 :) – mehmetsen80
이 작업을 수행하는 방법을 찾고 있는데, 솔루션을 만들어야 할 것처럼 보입니다. –