4
votes

I am facing issue during push notifications when app is installed on IOS(8.3) device(iPhone and iPad).

Its working locally(in development). But when I configure the same in production( upload app to app store ). It is not working.

These are the configurations that I have done: * In Xcode, in entitlement file, for "APS environment" key i have given value as "production". * While creating the SSL certificate i have created the production SSL certificate. * In code i have used "withProductionDestination()" method while pushing the notification to APNS.

I am not geting any error or exceptions while sending the notification payload with token to APNS(both in production and development).

I have verified that the notifications feature is active in my account for both development and production. I have also verified the certificates and they are correct.

Can you please let me know what steps I might have missed or doing wrong?

3

3 Answers

1
votes

Device token for Production (distribution) and Sandbox (developer) are different for same device.

I was also facing the same issue that push notifications were not coming in production and problem was that I was still using device id which I received in developer mode. So, I generated device id again with production certificate and notifications started to come again.

Also, make sure that you access the production environment at this URL gateway.push.apple.com with port 2195.

0
votes

If you use production certificate for push notifications, you need to remove .sandbox in the apns server address and if you install the app by using Xcode, generally by using run option, then the mode will be set to development and the push notifications from production environment won't be received. You need to install the app by generating the .ipa file and install in from iTunes.

0
votes

I had the same issue. PN's were working on development, but couldn't get them on production.

What helped me: Adding APNS for Distribution Certificate to Firebase.