When do I update the APN pem - apple-push-notifications

We are using the development APN pem currently.
We are about to submit app to the apple store for review for distribution
Shall we change the APN pem to distribution one now or only after apple's approval?
Currently for beta testing, we are using the build that uses development APN pem

You should not change the Push Notification Cert on your server, instead you should provide one for each environment (development, production). You can create one certificate per environment for your app in the Developer Portal. This approach allows you to test your push notification code and setup from Debug-Builds as well as from AdHoc-, TestFlight- or AppStore-Builds.

Related

APNS Certificate production

Did I miss something?
I've created some push notifications in Xamarin.iOS and it works perfectly with the Development certificate.
Then I created a Production certificate and it doesn't work.
Does APNS work differently in Production?
Thanks.
There are a few things to doublecheck. Make sure that:
You're using an App Store and Ad Hoc certificate to sign your app.
You're using an Apple Push Notification service SSL (Sandbox & Production) certificate on the server side
The aps-environment value in your info.plist is set to production

Production Push Notification .p12 Production Certificate not working for Enterprise Distribution App (outside of app store)

I've tried to send push notification using "Development SSL Certificate" or the sandbox .p12 cert the iphone is able to receive notification sent from MobileFirst Operations Console.
However, when I replace the sandbox .p12 cert with the production one, I couldn't receive push notification. I even deleted the device app, remove the device from the registered list and re-register the device. But I'm still getting the same result.
Are there any additional settings needed?
MFP server version is "Product version: 8.0.0.00-20170220-1900"
Update:
From this MobileFirst tutorial Link
"The APNS production certificate can only be tested once the application that utilizes it has been successfully submitted to the Apple App Store."
What about in house distribution app/"save for Enterprise Deployment" outside of the app store?
Please make sure the push notification capability is enabled from the capabilities tab of the project target if you are deploying your application from xcode 8.0 or later.
This should be on if you deploy your application from xcode 8 or later.
For push notifications to be sent, the following servers must be accessible from a MobileFirst Server instance:
Sandbox servers:
gateway.sandbox.push.apple.com:2195
feedback.sandbox.push.apple.com:2196
Production servers:
gateway.push.apple.com:2195
Feedback.push.apple.com:2196
1-courier.push.apple.com 5223
During the development phase, use the apns-certificate-sandbox.p12 sandbox certificate file.
During the production phase, use the apns-certificate-production.p12 production certificate file.
Reference : https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/notifications/sending-notifications/#apple-push-notifications-service

How does Parse Server determine what APNS push certificate to use?

How does Parse Server internally decide on which APNS push certificate to use? (development vs production)
The server uses the apn node module and will try every certificates to issue your notification in order.

Dependency between APNS certificate and distribution provisioning profile?

I have an app in the App Store with APNS.
Now, my distribution profile is broken and I can't add my device to the distribution profile. It is a generated profile by apple with the prefix XC:.
So one solution is to create a new distribution profile for a new version of my app and submit it to the App Store.
But do I then also need to create a new APNS certificate? Or will this also work with the new distribution profile?
Perhaps my actual question is: is there a relationship between the distribution profile and the APNS certificate? Or is it the app ID that is important to let the APNS work?
As outlined in the push notification guide, the SSL certificate used for push notifications is independent from the distribution provisioning profile used by your app.
However, you need to ensure that your new provisioning profile provides the correct entitlements for using push notifications and their production/development environment, as described here. Good luck.

Are different certificates used automatically

I'm building an app that uses Parse to send push notifications. Currently I am in beta and have uploaded both a development and production push certificates. Client side, I add a bool to the Installation object to designate if the client is running a beta version.
When I send a push notification with Cloud Code how do I specify which certificate to use? Is it automatically selected for me? What happens when my app is in production simultaneously with my beta?
I don't use Parse, but I found this in their tutorial :
Note that once you have uploaded a production push certificate to Parse, you will only be able to target devices using a distribution provisioning profile. Devices running an app signed with a development provisioning profile will need to install the newly provisioned build again.
Based on this quote, you can't use Parse simultaneously for both development and production push notifications.

Resources