I followed all the steps described in the blog post (some of them multiple times)
http://www.coronalabs.com/blog/2011/12/21/push-notifications-for-ios-in-corona-sdk/
When I exec the php script in the terminal on my Mac it gives the expected output:
Connected to APNS
Message successfully delivered
But it doesn’t seem to deliver any notification to the app installed on my device. I’ve double-checked the device token and run out of ideas. Any ideas what might be going wrong?
Also, when I copy the same php script to a webserver and invoke it through a web browser, I get the following error:
Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Connection refused) in test-push.php on line 21
Failed to connect: 111 Connection refused
The line it is complaining about is:
18 // Open a connection to the APNS server
19 $fp = stream\_socket\_client(
20 'ssl://gateway.sandbox.push.apple.com:2195', $err,
21 $errstr, 60, STREAM\_CLIENT\_CONNECT|STREAM\_CLIENT\_PERSISTENT, $ctx);
Any help greatly appreciated. This is an arcane part of the iPhone dev process and I’m stumped.
cheers
Ollie [import]uid: 131885 topic_id: 29616 reply_id: 329616[/import]