APNS Push Notifications Not Working on Production

后端 未结 4 1682
伪装坚强ぢ
伪装坚强ぢ 2020-12-10 01:10

I created an App to send remote notifications from a web server. When I tested the App in Development Mode all the notifications arrived correctly on the phone, after the Ap

相关标签:
4条回答
  • 2020-12-10 01:30

    Device token for Production and Sandbox are different for same device.

    So try getting device token by using Adhoc or Distribution certificates and use the generated token on production, this worked for me.

    0 讨论(0)
  • 2020-12-10 01:38

    If you work with the Google Firebase Cloud Messaging means, Kindly check

    1) Make sure with your server team, your server is changed from development to the production.

    2) Your production APN's certificate(convert into .p12 file) is uploaded or not.

    3) Make sure the .p12 file is not exported with the key from the Keychain access.(like this)

    4) If it is uploaded already, then check production APN's certificate's expiry date. Google FCM rejects the certificates before 2 months from the expiry of production APN's certificate.

    0 讨论(0)
  • 2020-12-10 01:43

    I Just came across the same problem. Push Notifications are arriving in Development Mode, not in Production. I also checked everything a few times and was sure that everything was fine.

    But it wasn't. It was the very first step in the process. Creating the csr. I was sure I didn't have to create a csr file for Development and Production and ended up using the same csr file for both certificats. Didn't work...

    Maybe someone in future does the same mistake und saves some time now.

    0 讨论(0)
  • 2020-12-10 01:48

    The link you mentioned is Sandbox APNS link. Production APNS link is as per Apple documentation is:

    You access the production environment at gateway.push.apple.com, outbound TCP port 2195.

    Few things to verify:

    1. Your AppId is enabled for Distribution APNS.
    2. You have created Distribution APNS SSL Certificate and is installed on your build machine (for App Store submission).
    3. You have installed the SSL Certificate in step 2 on your server.
    4. You are not by mistake using Development APNS SSL Certificate.
    0 讨论(0)
提交回复
热议问题