GCM certificate configuration not working or iOS
Asked Answered
I

8

11

I am facing one issue when I am trying to confiure the GCM and getting configuration file. When I am trying to upload the production certificate over the GCM portal it says "Bundle Id in certificate doesn't match with Bundle Id you entered". I verified already for the same. Still no joy. Anyone help plz.

Incantation answered 13/8, 2015 at 7:36 Comment(3)
same issue. I have checked all bundles and all certificates, have generated new certificates, but no successBulb
Same here .. New certiicates also not working.Incantation
I tried with 3 certificates none of them work. Also I tried all the solutions mentioned below even exporting 2 files from keychain and that too didn't work. Wondering if this is really a bug from Google as I checked every minute details but didn't found any issues.Kiri
S
4

I tried it with both Development and Production .p12, both worked for me.

You need to make sure you generate a correct .cer certificate file from your Bundle ID, and need to make sure you export the correct .p12 file from your Keychain Access. You can view the sample steps in this page.

You need to make sure the iOS Bundle ID you input in the GCM portal. (I use mine com.ziyang.samples.quickstart.gcm)

enter image description here

matches the Bundle ID in your Apple Developer Portal. (I use mine com.ziyang.samples.quickstart.gcm)

enter image description here

If I miss typed the iOS Bundle ID in the GCM portal, it will show the below error:

enter image description here

Skelly answered 13/8, 2015 at 17:30 Comment(3)
Thanks for our Help. It has now resoved. :)Incantation
@Akanksha, please accept this answer, if it resolved your issue, so that other users with same issue can resolve their problems.Skelly
Try to create p12 from certificate directly (not by right clicking on the key, but on certificate).Philomel
B
34

For my case, I have to export a cer not a private key.enter image description here

Biotechnology answered 18/3, 2016 at 2:46 Comment(2)
Saved my Day. Maybe time they fixed this in the Firebase documentation.Foozle
This should probably be added to the answer - as it turns out, for Production you export the whole cert, for development it's just the key. Both as p12 formats though.Mei
S
10

I had the same problem but for different reason. It turns out that the .p12 file has something wrong. If I export .p12 file from Keychain Access by selecting both certificate and key and export 2 items together, it doesn't work. I need to export the certificate and key separately and merge them later. Use terminal to merge two files:

cat cert.p12 key.p12 > cert_merged.p12
Silvas answered 9/9, 2015 at 3:18 Comment(4)
I tried using this command but didn't help. Can you please elaborate exactly how it will behave when I have password protected p12 files?Kiri
One more question: How do you export certificate and keys separately? What I did is selected single file and exported but merging two files didn't work for me.Kiri
I selected single file and exported it, however, I left the password field blank. So those .p12 files were not password protected. Maybe that is why I could merge them.Silvas
@Denn Currently, FCM is misleading the process. It asks to export only private key in the documentation. But, when I do that, it says bundle id not matched. When I export the whole certificate including private key, it worked. Anyway, idea of exporting both .cer & private key is from you. Credits to you. Thanks.Irreverence
S
9

I have been getting same exact problem in Firebase (FCM).

The only solution which has worked for me, which I found by hit and trial is while exporting the Cert as the P12, only select the Cert but don't select the Key.

You will still be able to export only the Cert (without the key) as a P12 file and set the password in a similar way.

Now uploading this P12 file with the provided password works for me.

Make sure to export only the certificate not the key... by clicking on the triangular/caret dropdown icon and deselecting the key

Export only the certificate not the key... by clicking on the triangular/caret dropdown icon and deselecting the key

Stalactite answered 9/8, 2016 at 13:53 Comment(0)
S
4

I tried it with both Development and Production .p12, both worked for me.

You need to make sure you generate a correct .cer certificate file from your Bundle ID, and need to make sure you export the correct .p12 file from your Keychain Access. You can view the sample steps in this page.

You need to make sure the iOS Bundle ID you input in the GCM portal. (I use mine com.ziyang.samples.quickstart.gcm)

enter image description here

matches the Bundle ID in your Apple Developer Portal. (I use mine com.ziyang.samples.quickstart.gcm)

enter image description here

If I miss typed the iOS Bundle ID in the GCM portal, it will show the below error:

enter image description here

Skelly answered 13/8, 2015 at 17:30 Comment(3)
Thanks for our Help. It has now resoved. :)Incantation
@Akanksha, please accept this answer, if it resolved your issue, so that other users with same issue can resolve their problems.Skelly
Try to create p12 from certificate directly (not by right clicking on the key, but on certificate).Philomel
B
2

Make sure you're using your APNS certificate and not your regular development or production certificate. Just spent an hour on this until I realised my mistake!

Broddy answered 13/11, 2015 at 14:43 Comment(0)
S
0

if you sure you set the right bundle id You can solve it by:-

1-Export only private key as p12.

2-Export only CERT as p12.

3-Export CERT with private key as p12.

and try one by one to solve this issue

Snakebite answered 12/12, 2016 at 7:51 Comment(0)
A
0

Please select the Certificate instead of the key in the Keychain Access while exporting it to .p12.

Alix answered 20/1, 2017 at 8:27 Comment(0)
S
0

A Password is Required when exporting the development certificate. The Development certificate would not upload with any of these suggestions until I added a password. I was, however, able to upload the Release certificate without a password. I also used the suggestion of @Sur Max to only export the certificate and not the key.

Superload answered 28/4, 2017 at 18:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.