Reputation: 2218
I'm using:
Xcode10 Legacy build
Phonegap-plugin-push 1.10.5
I followed https://github.com/aggarwalankush/push-notification-server (notification server) and https://github.com/aggarwalankush/ionic-push-base (ionic app)
I have set up FCM using https://medium.com/@ankushaggarwal/gcm-setup-for-android-push-notifications-656cfdd8adbd.
I have also set up the .p12 certificate for both production and development and have targeted the production certificate in my notification server.
Once my app was published to the app-store, the push notification broke. But development build is still working fine. What could be the reason?
I have also upload the certificate into FCM as follows:
Upvotes: 0
Views: 802
Reputation: 2218
I have finally figured out the issue.
It is due to :
ApnsService service =
APNS.newService()
.withCert(PATH_TO_P12_CERT, CERT_PASSWORD)
.withSandboxDestination()
.build();
where withSandboxDestination() is for debugging purposes.
Even if you compiled the app "for release" in xcode , it will be still under "development".
Once the app is on the app store, you would need to:
change "withSandboxDestination()"
to
"withProductionDestination()"
Hope this helps anyone who has the same issue as me.
Upvotes: 1