I ran into a problem with the APNS php code for push notification on iOS devices. I have two separate connections for development and production.
- I configured the development connection on my server by adding the .pem and Passphares file certificate that it works fine and I received a notification. Check out my development configuration:
URL: '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);
$push->setProviderCertificatePassphrase('1234567');
$push->setRootCertificationAuthority('APNS_Dev_ISAS.pem');
$push->connect();
Question:
- How did I configure the connection for Production by adding the following parameters, but I get a connection error:
URL: ssl: //gateway.push.apple.com: 2195
$push = new ApnsPHP_Push(
ApnsPHP_Abstract::ENVIRONMENT_PRODUCTION,
'APNS_PROD_ISAS.pem'
);
$myNewLogger = new MyNewLogger();
$push->setLogger($myNewLogger);
$push->setProviderCertificatePassphrase('12345678');
$push->setRootCertificationAuthority('APNS_PROD_ISAS.pem');
$push->connect();
:
INFO: ssl://gateway.push.apple.com: 2195... : 'ssl://gateway.push.apple.com: 2195': (0)
INFO: (1/3)... INFO: ssl://gateway.push.apple.com: 2195... : 'ssl://gateway.push.apple.com: 2195 ': (0)
INFO: (2/3)...
INFO: ssl://gateway.push.apple.com: 2195... : 'ssl://gateway.push.apple.com: 2195': (0)
INFO: (3/3)...
INFO: ssl://gateway.push.apple.com: 2195... : 'ssl://gateway.push.apple.com: 2195': (0)
google , , , , .
- .
- .pem pusher. .
- , . URL- .
. .