iosflutterfirebase-cloud-messagingapple-push-notifications

When configuring Firebase to on iOS, should I prefer using an APNs key or APNs Certifcate


I am setting up Firebase Cloud Messaging to work with my flutter app on iOS.

I have noticed that Firebase iOS configuration page accepts APNs Keys and APNs certificates.

Is there any reason to prefer one over the other?

My specific use case is for an internal test app which will never reach production.


Solution

  • Regardless of your app being an internal test app, it is always a good practice to use the Apple's New APN Key (.p8) as it is designed to never expire. You could read more about it here

    The old APN Certificate (.p12) is valid only for only 12 months. And if you have worked in real-live production apps, renewing the old APN Certificate every 12 months is a very unproductive experience.

    Common FAQs with new APN Key

    Q: Does creating a new APN Key invalidate my existing APN Certificates?

    A: No.

    Q: After creating an APN Key, can I still create a new APN certificate?

    A: Yes.

    Q: Will generating a second APN key for one development account have any repurcussions on an existing apn key?

    A: No.