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.
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:Double-check that in the "Build Phases" section of your project that your project is including GoogleService-Info.plist
.
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.