Unable to find "GoogleService-Info.plist" while trying to integrate Google Sign-in in my app

Karan. S picture Karan. S · Jul 8, 2015 · Viewed 27.6k times · Source

I have followed : Integrating Google Sign-In into your iOS app

However when I execute the app, it halts in the app delegate itself - even before I can see my first view controller.

The reason is because of these few lines of code I wrote in the "application didFinishLaunchingWithOptions withOptions", which are:

"NSError* configureError;
[[GGLContext sharedInstance] configureWithError: &configureError];
    NSAssert(!configureError, @"Error configuring Google services: %@", configureError);

 [GIDSignIn sharedInstance].delegate = self;"

In the debug, when it reaches this code, it says

"Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error configuring Google services: Error Domain=com.google.greenhouse Code=-200 "Unable to configure GGL." UserInfo=0x7ff9c2e1d000 {NSLocalizedRecoverySuggestion=Check formatting and location of GoogleService-Info.plist., NSLocalizedDescription=Unable to configure GGL., NSLocalizedFailureReason=Unable to parse supplied GoogleService-Info.plist. See log for details.}'".

I put the GoogleService-Info.plist in my directory, but it still isn't working.

Answer

class picture class · Jul 8, 2015
  1. You must drag and drop the GoogleService-Info.plist file into your project in a location such as Shared Resources. When you have successfully added the file, you should also make sure to include it in the project build:

Image showing the added resource

  1. Double-check that in the "Build Phases" section of your project that your project is including GoogleService-Info.plist. enter image description here

  2. Double check the file name. The file name must be exactly GoogleService-Info.plist common misspellings include GoogleServices-Info.plist and GoogleService-info.plist - case sensitive and exactly named only will work.