Hersh Bhargava Hersh Bhargava - 6 months ago 75
iOS Question

Google Identity Toolkit not getting Client ID for Login

I am using Google Identity Toolkit for federated login in my iOS 9-compatible app. I recently updated all of the frameworks and libraries and started using Cocoapods for dependency management. Now, while Facebook login works fine, when the user taps the "sign in with google" button, the following error is thrown:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'You must specify |clientID| for |GIDSignIn|'


The configuration code in my AppDelegate where I set the clientID is as follows:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
GITClient *gitkitClient = [GITClient sharedInstance];
gitkitClient.apiKey = GITKIT_API_KEY;
gitkitClient.widgetURL = GITKIT_WIDGET_URL;
gitkitClient.providers = GITKIT_PROVIDERS;
[GPPSignIn sharedInstance].clientID = GOOGLE_CLIENT_ID;

...various unrelated code...
}


Any guidance would be sincerely appreciated.

Answer

The answer was actually completely unrelated to the code configuration, and it seems likely that there was a Google-end bug. A new update was released so a few weeks later a simple pod update fixed the problem.

Comments