简体   繁体   中英

iOS APNs Push Notifications - Development

I would like to use development certificate to send push notifications but it doesn't work. I have generate the SSL certificate but when is use it on php this is the result

[03-May-2014 14:02:15 Europe/Rome] PHP Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Connection timed out)

I tried to create the file. pem several times but never goes well.

For generating the pem file I performed the steps as described on Apple Documentation.

What is the matter?

Did you check that your server can access to apple servers ?

Try with telnet:

telnet gateway.sandbox.push.apple.com 2195

If the answer is yes, my advice is to follow that tutorial to be sure that your pem file is well generated: http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1 (Go to "Making a PEM File" chapter)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM