Google doesn't work on iOS - invalid GOOGLE_APP_ID error

I use the google sign in an iOS app, but it shows me an error.

I used Cocoapods to add sdk. when I do all the settings in the project and run the application, getting this

GOOGLE_APP_ID either in the plist file 'GoogleService-Info.plist' or the one set in the custom settings is not valid. If you are using a plist file, use the version of the iOS package identifier to download the file, and do not manually edit GOOGLE_APP_ID. You can change your application package identifier to '(null)'. Or you can download a new configuration file matching your package ID https://console.firebase.google.com/ and replace the current one.

and all that I added correctly, I don’t know why its not working. Before it worked, I updated my pod file to get the last google sign.

my pod file has pod 'google / signin' when i install pod (pod have) its added

Installing FirebaseAnalytics (3.2.0) Installing FirebaseInstanceID (1.0.6) 

I do not know why this happened, even I did not add anything related to Firebase.

this is my dependency analysis loading dependencies

 Installing FirebaseAnalytics (3.2.0) Installing FirebaseInstanceID (1.0.6) Installing Google (3.0.3) Installing GoogleAppUtilities (1.1.1) Installing GoogleAuthUtilities (2.0.1) Installing GoogleInterchangeUtilities (1.2.1) Installing GoogleNetworkingUtilities (1.2.1) Installing GoogleSignIn (4.0.0) Installing GoogleSymbolUtilities (1.1.1) Installing GoogleUtilities (1.3.1) Generating Pods project Integrating client project [!] Please close any current Xcode sessions and use `googletest.xcworkspace` for this project from now on. Sending stats 

Why does it install Firebase dependencies and google sign

How to solve this problem.

+6
source share
2 answers

I was able to fix this problem:

  • Open https://developers.google.com/mobile/add
  • Choose a platform: iOS app
  • Application Name: select an existing application from the drop-down menu
  • iOS Bundle ID: select an existing bundle identifier from the drop-down menu
  • Continue and configure services
  • Make sure that Google SignIn has a green checkmark.
  • Creating configuration files
  • Download plist

The loaded plist has the same values ​​as my previous ones for CLIENT_ID , REVERSED_CLIENT_ID and BUNDLE_ID , but it adds a few keys, including GOOGLE_APP_ID .

I replaced the plist file that I had in my Xcode project with this new one and everything returns to normal.

+4
source

I ran into the same problem and it helped me to ignore the GGLContext configuration and manually configure SignIn instead:

 NSString *googlePlistPath = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"]; NSDictionary *googleInfo = [NSDictionary dictionaryWithContentsOfFile:googlePlistPath]; [GIDSignIn sharedInstance].clientID = googleInfo[@"CLIENT_ID"]; 

So, here you read your GoogleService-Info.plist , getting the client ID from it and passing it to the GIDSignIn instance.

I do not use anything from Firebase, but now it seems that this is just part of Google.

0
source

All Articles