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.
In any web browser, go to admin.google.com. Starting from the sign-in page, enter the email address and password for your admin account (it does not end in @gmail.com). If you forgot your password, see Reset your administrator password.
As explained at https://developers.google.com/identity/toolkit/ios/quickstart#step_3_set_up_the_quick-start_app, [GIDSignIn sharedInstance].clientID
needs to be initialized:
GITClient *gitkitClient = [GITClient sharedInstance];
gitkitClient.apiKey = GITKIT_API_KEY;
gitkitClient.widgetURL = GITKIT_WIDGET_URL;
gitkitClient.providers = @[ kGITProviderGoogle ];
[GIDSignIn sharedInstance].clientID = GOOGLE_CLIENT_ID;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With