Quote:
Originally Posted by SlumRf
Hi,
I have read this tutorial : MacOSCoders Blog Archive iPhone Apple Push Notification Service (APNS)
But I have this error mesage :
Code:
Warning: stream_socket_client() [function.stream-socket-client]: SSL operation failed with code 1. OpenSSL Error messages: error:14094418:SSL routines:func(148):reason(1048) in C:\Program Files\EasyPHP 3.0\www\push\apns.php on line 11
Warning: stream_socket_client() [function.stream-socket-client]: Failed to enable crypto in C:\Program Files\EasyPHP 3.0\www\push\apns.php on line 11
Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Unknown error) in C:\Program Files\EasyPHP 3.0\www\push\apns.php on line 11
Failed to connect 0
In the tutorial comments someone explain that this is a certificate problem ; in order I :
- Import dev push certificate from apple's backoffice
- In keychain manager : right click / export to certificate.p12 the certificate
- In kechain manager : unfold the certificate to see the private key : right click on private key and export to key.p12
- then continue the terminal instruction from tutorial
Any idea ? How could i test my final ck.pem ?
|
Try this application on a device (iTouch / iPhone) for results.
Do the following
* The put alerts for methods , to get the device token and error if any . Or simply trail the error in logger connection the device to XCode in debugging mode. Errors give lot of information.
* For quick testing use this code[/list]. The code runs directly on MAC so no need for another server.
* Check out the PHP code and certificate building steps form
here.
The above steps should get you started for I have clustered all in a
tutorial here