iPhone Push Notification Unable to Connect to the SSL Server

前端 未结 3 2078
失恋的感觉
失恋的感觉 2020-12-30 16:54

I followed the instructions at:

How To Build An Apple Push Notification Provider Server When I run the php script on my MacOSX or on Windows using Parallel desktop,

相关标签:
3条回答
  • 2020-12-30 17:25

    Your hosting provider probably does not allow outbound connections to ports 2195 and 2196. Most shared hosting providers do not have those ports open. You might need to get a VPS or you can also try UrbanAirship which provides Apple Notification Service integration and is free for a certain limit per month.

    0 讨论(0)
  • 2020-12-30 17:27

    Yes you need a certificate. THis is explained in the Apple docs. One catch, you will probably need to convert the cert to .pem format. The .pem cert needs to include both the certificate and the RSA private key.

    Here is a good site to read: http://www.macoscoders.com/2009/05/17/iphone-apple-push-notification-service-apns/

    My pem looks like:

    Bag Attributes
        friendlyName: Apple Development Push Services: <my data>
        localKeyID: <my local key in hexascii> 
    subject=/UID=com.my.push.sandbox1/CN=Apple Development Push Services: <my data>/C=US
    issuer=/C=US/O=Apple Inc./OU=Apple Worldwide Developer Relations/CN=Apple Worldwide Developer Relations Certification Authority
    -----BEGIN CERTIFICATE-----
    <my certificate data omitted>
    -----END CERTIFICATE-----
    -----BEGIN RSA PRIVATE KEY-----
    <my key data omitted>
    -----END RSA PRIVATE KEY-----
    
    0 讨论(0)
  • 2020-12-30 17:50

    I found the simplest and cheapest solution was to request a dedicated IP from your hosting company. At Blue Host it was $2.50 a month. With this dedicated IP, they were willing to open ports 2195 and 2196.

    0 讨论(0)
提交回复
热议问题