iPhone: Connection refused error while connection Apple's Push Notification Service
I have been scratching my head since long now to get rid of following error message.
Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.push.apple.com:2195 (Connection refused)
I have tried multiple times generating the correct certificate and made sure that project is signed 开发者_JAVA百科with the correct bundle identifier.
I have also tried using testing script PHP(https://devforums.apple.com/message/50461) and Python (http://stackoverflow.com/questions/1052645/apple-pns-push-notification-services-sample-code) but both are giving same error message.
Could anyone please help me to know how to get rid of this error message?
Thanks.
Gotcha...Our firewall setup to not allow any other ports not listed in settings. Asked admin people to add it and it doesn't show this error message now....!! I have sent and message but didn't receive since last 5 minutes. I know that APNS messages are not guaranteed. Will wait for some more time. Hopefully it arrives.. :)
精彩评论