Failed to configure Firebase InstanceID

hi I try to include firebase in my application and followed the documentation, when I try to log in to Google, I could not configure the Firebase InstanceID error. Provide tips on how to overcome this error.

+5
source share
7 answers

You must add your project created on

https://developers.google.com/mobile/add?platform=ios or the fire base console in the Firebase control panel.

Now you can download GoogleService-Info.plist from Firebase and import into your project.

+2
source

There are two things you can verify (and hopefully you fix it):

  • Make sure your BundleIdentifier is exactly the same in your Firebase project as it is in your Xcode, i.e. com. [yourcompany]. [yourappname]
  • Make sure you get the latest GoogleService-Info.plist file . Go to Firebase Console → Settings → Your Application - a blue button will appear on the right, which allows you to download a new configuration file

This solved it for me.

+9
source

Error Details

Starting with version 3.13.0 , an error appears in the Firebase/Core SDK.

I added a symbolic breakpoint to -[FIRInstanceID(FIRApp) configureInstanceIDWithOptions:app:] and stepped through the assembly. It appears that FIRApp.configure() ignoring the IS_GCM_ENABLED flag in GoogleServices-Info.plist and is trying to configure GCM regardless of the state of the flag. In my case, since GCM is not used in my project, the application will crash because there was no GCM_SENDER_ID .

Workaround

Add a dummy value (i.e. 123456789012 ) for GCM_SENDER_ID in the GoogleService-Info.plist . This will allow you to successfully configure the application.

+7
source

I am installing Firebase in code using FIROptions . In my case, I was missing gcmSenderID , fixed it, then it works

+1
source

Firebase DevRel is here. This should be a mistake, if you did not enable gcm, you should not go through setup. Filed inside.

Currently, the workaround manually changes "IS_GCM_ENABLED" to "NO" in the file "GoogleService-Info.plist"

+1
source

I was getting this error since I did not have my GoogleService-Info.plist in my test folder. (if you are using TDD)

As in the case of the latest Firebase Core 3.16.0 - I think I need to include it in my main project, as well as copy the version to my test root.

0
source

This also happens when changing the Google SDK integration from one account to another and do not edit the API keys on the application side.

Make sure that when switching from one google account to another, look again at all the SDK manuals, such as FCM, Google Sign-in, etc. and make sure that you are using the new API keys in the application (client_id, Scheme URI).

0
source

All Articles