iOS Question Firebase Messaging: APN Authentication Keys vs Authentication Certificates

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
Until now whenever I wanted to add Push notifications to my apps, I have followed the steps outlined in Erel's tutorial


This works great except that each year I need to update the APN certificates.

As the number of App I have in production increases, this is a bit of a b**lache.

It looks like there is another way which is to use an APN Authentication Key rather then APN Certificates.

What is the difference between APN Authentication Key and APN Certificates? As far as I can see:

1610369577166.png


Plus, it never expires!


Setting Up an APN Authication Key.

Step 1: Go to the Keys section of your apple Developer account and click on the blue Plus.
1610369749027.png
Step 2: Give the Key a name and select the "Apple Push Notification service (APN)" option. Click Continue.
1610369905773.png

Step3: On the next screen, Click Register
1610369973668.png
Step 4 : Download the key. Keep it safe!!!! Record the KeyID as you will need this later. (it is also in the filename, helpfully)
1610370028867.png

Step 5: Add the key to your firebase account under SETTINGS -> CLOUD MESSAGING ( the same place as the previous keys)
1610370197044.png

Step 6: Click on the Upload button and find the file you downloaded from Apple
1610370300303.png
The Key ID is from the Apple site, they helpfully include it in the filename of the downloaded file.
The Team ID is the ID of your Team in Apple, It normally appears in the top right of the Apple screen underneath your name.

Step 6: Click Upload
1610370502714.png


You're Done!

I found that this is a drop in replacement for the APN Certificates. Everything seems to be working fine.

Update: as @Marcos Alves identifed in this thread. https://www.b4x.com/android/forum/threads/problem-with-certificate.129709/ , It takes some minutes for the certificate to propagate so if you are replacing a live working certificate, be patient.
 
Last edited:
Top