The Bundle ID in the certificate does not match the Bundle ID you entered

21,596

Solution 1

The Firebase documentation regarding certificates is misleading. In the section Configure an App ID for Push Notifications under step 8 it tells you to expand the arrow and export the private key. Don't do this, just export the certificate itself (i.e. on the line above the private key) as a .p12 and it will work.

Solution 2

I am adding this answer as a supplement to the accepted answer. If you receive this error, it is due to your applications bundle identifier not matching what you supplied to firebase when creating your firebase application.

To find your firebase bundle identifier:

Go to Firebase > Project Overview > Find your iOS application and press the 3 vertical dots on the right hand side and press Settings. You should be able to scroll down and find your Bundle ID listed

To find your apple bundle identifier:

Open Xcode, click on your top level project file and click on the General tab. Under signing, locate the Provisioning Profile and click on the 'i' icon on the right of the provided profile to view more information. Your bundle ID should be listed for both your application and for your developer account.

Your Firebase Bundle ID and Apple Bundle ID must match. If they do not, the easiest thing to do is just create a new application in Firebase. Do not forget this will require you to download the Google-Info.plist file again. Everything else should be straightforward.

Uploading the APNS certificate was not so straightforward on Firebase's documentation so I will write up how to do that also.

  1. Assuming you have generated the certificate and added it to the keychain, open Keychain Access app and right click on your APNS certificate (listed as Apple Development Push Services or similar).
  2. Right click and select export.
  3. On Firebase, go to Project Overview, find your iOS application and again press the 3 vertical dots and select Settings.
  4. At the top of this page, switch to the Cloud Messaging tab. You should see a section to upload your APNS certificate. You need to provide the password you created when exporting the Certificate in step 1&2.

Solution 3

Follow the instructions below.

Create new app in firebase console and add same bundle id for the app as you added in apple's developer account. this will fix your problem.

Or

Go to firebase console and update your project bundle id same as in apple's developer account.

Solution 4

Please remove all certificates related apns from keychain.And once again install it works.

Share:
21,596
waseefakhtar
Author by

waseefakhtar

Email: [email protected]

Updated on March 19, 2021

Comments

  • waseefakhtar
    waseefakhtar about 3 years

    My Bundle ID of the certificate does not match the Bundle ID entered in the Firebase console and when I try to upload the certificate for Cloud Messaging. I get the error:

    The Bundle ID in the certificate does not match the Bundle ID you entered.

    My question is, what’d be the best way to match the Bundle IDs of my project in Xcode, Apple Developer Portal, and Firebase Console? Do I create a new app in iTunes Connect and then generate new certificates? Can I change Bundle IDs in Firebase Console or Apple Developer Portal? Or Can I simply create new certificates with the matching bundle IDs as it is in my Firebase Console without having to create a new app in iTunes Connect?