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?
app” which does not match your bundle identifier “com. companyexample. appTests”. Xcode can resolve this issue by downloading a new provisioning profile from the Member Center.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With