I have implemented a sample push notification service for my App.
Right now I test in a sandbox environment.
I get notifications when I manually call the PHP script to push notifications through APN.
When I write a scheduler using crontab to automate the delivery of notifications I dont get the notifications. The error I get as a mail is:
PHP Warning: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure in /Users/aspire/Desktop/SimplePush/simplepush.php on line 21
PHP Warning: stream_socket_client(): Failed to enable crypto in /Users/aspire/Desktop/SimplePush/simplepush.php on line 21
PHP Warning: stream_socket_client(): unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Unknown error) in /Users/aspire/Desktop/SimplePush/simplepush.php on line 21
Failed to connect: 0
Can someone explain what the problem could be?