Issue with uncaught NSException: 'Your app must support the following URL schemes: (null)'

3,541 views
Skip to first unread message

Sam Gammon

unread,
Jun 9, 2015, 6:52:02 AM6/9/15
to google-iden...@googlegroups.com
Hey Google,

So I updated to iOS 9 today. I also (great idea!) decided to upgrade to Google Sign In, which seems A Whole Lot Better than the previous alternatives.
I followed the getting started guide to build the configuration out, and added my proper URL schemes (for instance, the app's client ID).

Upon launching the app and attempting sign in with Google, I get the following uncaught exception:

2015-06-09 03:43:23.800 <appname>[238:7171] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Your app must support the following URL schemes: (null)'


I will try this out on my iOS 8 branch tomorrow to make sure it's not the full-point OS upgrade, but it is an unhandled exception nonetheless, originating from inside Google's code (between GIDSignIn.signIn and GIDSignIn.delegate.signIn).


Please help!


-sam







This message (and any associated files) may contain confidential and/or privileged information. If you are not the intended recipient or authorized to receive this for the intended recipient, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately and delete this message. Thank you for your cooperation.

Derek Salama

unread,
Jun 9, 2015, 5:21:06 PM6/9/15
to google-iden...@googlegroups.com, s...@momentum.io
Hi Sam,

This isn't quite the right forum for you (see developers.google.com/identity/toolkit).

For assistance with Google Sign In, please post your question on Stack Overflow with the google-signin tag.

Sam Gammon

unread,
Jun 9, 2015, 5:27:32 PM6/9/15
to google-iden...@googlegroups.com
Hi Derek,

It appears that StackOverflow doesn't know about that tag yet and won't let me create it. I'll tag it with your guys' project for now.

Here is the corresponding question:
--
You received this message because you are subscribed to a topic in the Google Groups "Google Identity Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-identity-toolkit/TbEmIJSNDFE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-identity-t...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Xiangtian Dai

unread,
Jun 11, 2015, 1:33:27 PM6/11/15
to google-iden...@googlegroups.com
Hi Sam,

The error message is confusing, but what it really means is that the |clientID| property of the [GIDSignIn sharedInstance] is not assigned. A client ID identifies your app to Google services and can be obtained by registering your app in Google Developers Console https://console.developers.google.com/ . In step 2 of the getting start guide https://developers.google.com/identity/sign-in/ios/start , you're asked to download the configuration file after registration of your app, and in step 3 to add this file into your project. Please double check these steps.

Thanks for using GoogleSignIn,
Xiangtian

On Tuesday, June 9, 2015 at 3:52:02 AM UTC-7, Sam Gammon wrote:

Sam Gammon

unread,
Jun 11, 2015, 2:39:26 PM6/11/15
to google-iden...@googlegroups.com
Hi Xiangtian,

Unfortunately, I don't believe that is the issue. This code verifiably runs before any calls to GPPSignIn.signIn:

func prepareGoogleAccounts() -> SecurityLogic {
    Logging.say("Preparing Google Accounts integration...")
    var error : NSError?
    GGLContext.sharedInstance().configureWithError(&error)

    if error != nil {
        println("Failed to authenticate with Google Accounts: \(error!.localizedDescription).")
    } else {
        let gid = GIDSignIn.sharedInstance()
        gid.delegate = self
        gid.clientID = clientId
        gid.serverClientID = serverClientId
        gid.scopes = AppCredentials.baseScopes
        gid.shouldFetchBasicProfile = true
    }
    return self;
}

I have verified that our Client ID makes it onto the GPPSignIn singleton.

Also, if you happen to be on the Google Sign In team, it's a pretty huge snag that I can't actually tag my question with "google-signin" on StackOverflow. The tag supposedly hasn't been created yet. This leaves me in a pretty tough position finding support for this package.

​In addition, the Google plist configuration is added to my project and app target.​




--
You received this message because you are subscribed to a topic in the Google Groups "Google Identity Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-identity-toolkit/TbEmIJSNDFE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-identity-t...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Xiangtian Dai

unread,
Jun 11, 2015, 4:05:44 PM6/11/15
to google-iden...@googlegroups.com
Hi Sam,

Sorry I didn't realize that you were compiling the code for iOS 9. GoogleSignIn uses |canOpenURL:| to make sure the app can handle certain URL schemes for callback, but unfortunately in iOS 9 you'll need to declare these URL schemes in info.plist in LSApplicationQueriesSchemes array for this query to work. Our team is still working on making GoogleSignIn iOS 9 ready.

Another thing (not iOS 9 related) in your code snippet is that you need to either set |uiDelegate| or disable |allowsSignInWithWebView| or another exception will be raised.

I'll forward your concern about the StackOverflow tag to someone more familiar with the situation.

Thanks,
Xiangtian

Gus Class

unread,
Jun 11, 2015, 5:40:27 PM6/11/15
to google-iden...@googlegroups.com
We just created the S.O. tags yesterday - I followed up on your question there.  Sorry for the hiccups while we get everything going.
To unsubscribe from this group and all its topics, send an email to google-identity-toolkit+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




This message (and any associated files) may contain confidential and/or privileged information. If you are not the intended recipient or authorized to receive this for the intended recipient, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately and delete this message. Thank you for your cooperation.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Identity Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-identity-toolkit/TbEmIJSNDFE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-identity-toolkit+unsub...@googlegroups.com.

sai

unread,
Sep 23, 2015, 1:16:19 PM9/23/15
to Google Identity Toolkit
Add following info in info.plist

<key>CFBundleURLTypes</key>

<array>

<dict>

<key>CFBundleURLSchemes</key>

<array>

<string>{Bundle identifier}</string>

<string>{Revers ClientID}</string>

</array>

</dict>

</array>

Xiangtian Dai

unread,
Sep 29, 2015, 8:47:14 PM9/29/15
to google-iden...@googlegroups.com
Hi Sam,

We have released GoogleSignIn 2.3.0 which works on iOS 9 and makes use of its new SFSafariViewController feature for user to sign in. Please give it a try. Thanks.

On Thu, Jun 11, 2015 at 11:38 AM, Sam Gammon <s...@momentum.io> wrote:
Reply all
Reply to author
Forward
0 new messages