Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 402
waseefakhtar Avatar asked Jan 30 '17 21:01

waseefakhtar


People also ask

Which does not match the bundle ID Xcode?

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.


2 Answers

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.

like image 181
bobtune Avatar answered Oct 03 '22 04:10

bobtune


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.
like image 31
wizloc Avatar answered Oct 03 '22 06:10

wizloc