Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems to upload APN certifcates Firebase

I'm trying to configure my iOS app to receiver notifications with Firebase.

If I export the certificate and the private key without a password and try to upload it (production or development) on Firebase console I get the error "Incorrect password".

If I export the certificate and the private key with a password I get the error "An unknown server error ocurred" or "There was an error reading your certificate".

I don't understand why that is happening. I did follow the tutorial correctly. Can someone help me?

like image 905
Breno Macena Avatar asked May 23 '17 16:05

Breno Macena


People also ask

How do I add an APNs certificate to Firebase?

Upload your APNs authentication key Inside your project in the Firebase console, select the gear icon, select Project Settings, and then select the Cloud Messaging tab. In APNs authentication key under iOS app configuration, click the Upload button.

How do I upload a .p8 file to Firebase?

b: Team ID: Open your Developer account membership section here you will get Team ID value. After Getting this value just select your . p8 File & upload it on Firebase account. After uploading this just download GoogleService-Info.

How do I renew my APNs certificate in workspace one?

Renewing Your APNs Certificate from the Apple Push Certificate Portal. Navigate to Groups & Settings > All Settings > Devices & Users > Apple > APNs For MDM in the Workspace ONE UEM Console. Click Renew.


3 Answers

You should be using an APNS Authentication Key rather than the certificates. This is the new preferred method in iOS for a provider to register and send messages with APNS

From Firebase:

Configuration with auth keys is recommended as they are the more current method for sending notifications to iOS

From Apple:

For a provider to communicate with APNs, it must employ a valid authentication key certificate (for token-based connection trust) or SSL certificate (for certificate-based connection trust). You obtain either of these certificates from your online developer account, as explained in “Configure push notifications” in Xcode Help. To choose between the two certificate types, read Provider-to-APNs Connection Trust. Whichever certificate type you choose, provider connection trust is prerequisite to a provider sending push notification requests to APNs.

like image 74
Chris Avatar answered Oct 18 '22 04:10

Chris


while exporting just select the Apple Push Service part and don't select the private key from Keychain Access and export than in firebase Production APNs certificate browse the p12 file you just created, it will work.

I don't know when this implementation will be deprecated but it works as of now (19 Feb 2018).

like image 32
Anirudha Mahale Avatar answered Oct 18 '22 02:10

Anirudha Mahale


You should export only the certificate and don't select the private key . Please see this screenshot

enter image description here

like image 1
Sreeraj VR Avatar answered Oct 18 '22 03:10

Sreeraj VR