iosfirebasepush-notificationfirebase-notifications

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?


Solution

  • 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.