google-services: Trying to sign in crashes and gives me: ''Your app is missing support for the following URL schemes'

I’m running the following code versions on iOS 9:

Installing Google (1.1.0)
Installing GoogleAppUtilities (1.0.0)
Installing GoogleAuthUtilities (1.0.1)
Installing GoogleInterchangeUtilities (1.0.0)
Installing GoogleNetworkingUtilities (1.0.0)
Installing GoogleSignIn (2.3.1)
Installing GoogleSymbolUtilities (1.0.0)
Installing GoogleUtilities (1.1.0)

Here is the crash

 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Your app is missing support for the following URL schemes: com.googleusercontent.apps.514797035410-uksdcup8ju2g0frgqq3f88ieqnvmr2t9'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000106d32f65 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x000000010aa48deb objc_exception_throw + 48
    2   CoreFoundation                      0x0000000106d32e9d +[NSException raise:format:] + 205
    3   SlideMail                           0x0000000104d2d678 -[GIDSignIn signInWithOptions:] + 326
    4   SlideMail                           0x0000000104d319b8 -[GIDSignInButton pressed] + 331
    5   UIKit                               0x00000001086681fa -[UIApplication sendAction:to:from:forEvent:] + 92
    6   SlideMail                           0x0000000104b3792f -[UIApplication(EventInterceptor) heap_sendAction:to:from:forEvent:] + 337
    7   UIKit                               0x00000001087cc504 -[UIControl sendAction:to:forEvent:] + 67
    8   UIKit                               0x00000001087cc7d0 -[UIControl _sendActionsForEvents:withEvent:] + 311
    9   UIKit                               0x00000001087cb906 -[UIControl touchesEnded:withEvent:] + 601
    10  UIKit                               0x00000001086d2aa3 -[UIWindow _sendTouchesForEvent:] + 835
    11  UIKit                               0x00000001086d3691 -[UIWindow sendEvent:] + 865
    12  UIKit                               0x0000000108685752 -[UIApplication sendEvent:] + 263
    13  SlideMail                           0x0000000104b377b1 -[UIApplication(EventInterceptor) heap_sendEvent:] + 435
    14  UIKit                               0x0000000108660fcc _UIApplicationHandleEventQueue + 6693
    15  CoreFoundation                      0x0000000106c5f0a1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    16  CoreFoundation                      0x0000000106c54fcc __CFRunLoopDoSources0 + 556
    17  CoreFoundation                      0x0000000106c54483 __CFRunLoopRun + 867
    18  CoreFoundation                      0x0000000106c53e98 CFRunLoopRunSpecific + 488
    19  GraphicsServices                    0x000000010be0ead2 GSEventRunModal + 161
    20  UIKit                               0x0000000108666676 UIApplicationMain + 171
    21  SlideMail                           0x00000001048bcb22 main + 162
    22  libdyld.dylib                       0x000000010b88592d start + 1
    23  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

I added the following to my .plist and it’s still crashing.

    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>com.googleusercontent.apps.514797035410-uksdcup8ju2g0frgqq3f88ieqnvmr2t9</string>
    </array>

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 27

Most upvoted comments

D’oh. Forgot to add the URL schemes shown at the bottom of the tutorial:

https://developers.google.com/identity/sign-in/ios/start-integrating

I had the same issue and resolve it by performing below steps:

Add custom URL schemes to your Xcode project: 1)Open your project configuration: double-click the project name in the left tree view. Select your app from the TARGETS section, then select the Info tab, and expand the URL Types section. Click the + button, and add a URL scheme for your reversed client ID. To find this value, open the GoogleService-Info.plist configuration file, and look for the REVERSED_CLIENT_ID key. Copy the value of that key, and paste it into the URL Schemes box on the configuration page. Leave the other fields blank. When completed, save the file and rebuild the project.

For more detail visit https://firebase.google.com/docs/auth/ios/google-signin

I’ve faced the same problem. My mistake was to use the “Client ID” created in the google developer console when creating the “Web Application” login credentials and assuming that it is the same value used in the Android app.

You need to use the client ID in the generated GoogleService-Info.plist which is different!

**Note this comment only applies if using GoogleSignIn 3.0.0. If you are using GoogleSignIn v.4.0.0, Google states: “No longer requires adding bundle ID as a URL scheme supported by the app.”

@elbuenyuz Great question, I just took a shot in the dark to get Facebook Auth and Google Auth working in the same app and it actually worked, you add two URL Schemes, both with the same value for the REVERSED_CLIENT_ID key in the GoogleService-Info.plist (that URL value I will call RCURL).

  • Facebook SDK: [Facebook AppId],[RCURL]
  • Google SDK: [BundleIdentifier],[RCURL]

Noticed how I put that comma in bold, the url scheme entry is a key value pair and ends up in Info.plist in a particular key/value format. Here is a screenshot to help: screen shot 2017-05-21 at 6 06 56 pm copy

The solution for this problem is:

  1. First you need to open you Xcode project run open ios/Runner.xcworkspace

  2. In Xcode project find GoogleServiceInfo.plist, click and copy REVERSED_CLIENT_ID (right side)

Screenshot 2020-01-09 at 14 08 34
  1. Go to Runner -> Info-> URL Types and click to + .

  2. Past the REVERSED_CLIENT_ID in URL SCHEME

Screenshot 2020-01-09 at 14 16 40

The solution for this problem is:

1. First you need to open you Xcode project run open ios/Runner.xcworkspace

2. In Xcode project find GoogleServiceInfo.plist, click and copy REVERSED_CLIENT_ID (right side)
Screenshot 2020-01-09 at 14 08 34
1. Go to Runner -> Info-> URL Types and click to + .

2. Past the  REVERSED_CLIENT_ID in URL SCHEME
Screenshot 2020-01-09 at 14 16 40

This worked for me on Flutter as well 👍

I have already added Firebase cloud messaging. I downloaded the GoogleService-info.plist, which is needed for the Cloudmessaging. I added the google sign in for ios without using the firebase. I added the reversed client id, but i get an error that “your app is missing support for the following URL schemes”… The urlScheme is the reverse client id used by firebase and not the google sign in. How can i handle this?

@FuadEfendi thank you so much worked like a charm! I experienced the same when trying to login with Google Sign In and Firebase from iOS

If anybody else had this error even after setting the URL Type on Info tab, GOOGLE_SIGNIN_URL_SCHEME on Build Settings tab and adding GoogleService-Info.plist to your project, here’s a tip: when you add the plist file to your project, be sure to add to ALL freaking targets like the docs tell you to…

I had cloned a project from github and it had tvOS targets… since I’m not doing anything for apple tv, I didn’t bother to check those combo boxes, nor remove those tvOS targets… and got this error on iphone simulator, which I thought was completely unrelated… it drove me crazy for two days…

I had this issue for iOS, using Android Studio, so that any X-Code-related explicit troubleshooting steps are not applicable.

What I did is this:

    flutter create cscexams --org ca.tokenizer
    cd cscexams
    firebase login
    dart pub global activate flutterfire_cli
    flutterfire configure

After that, develop application, including Google Authentication (enable it in Google Console); Android works just fine, but iOS crashes with exact same message.

Explicitly adding this section to ios/Runner/Info.plist fixed the issue:

		<key>CFBundleURLTypes</key>
		<array>
			<dict>
				<key>CFBundleTypeRole</key>
				<string>Editor</string>
				<key>CFBundleURLSchemes</key>
				<array>
					<!-- Copied from GoogleService-Info.plist key REVERSED_CLIENT_ID -->
					<string>com.googleusercontent.apps.123456-REPLACE_ME</string>
				</array>
			</dict>
		</array>

Unfortunately, flutterfire configure command doesn’t do it for us.

The solution for this problem is:

  1. First you need to open you Xcode project run open ios/Runner.xcworkspace
  2. In Xcode project find GoogleServiceInfo.plist, click and copy REVERSED_CLIENT_ID (right side)
Screenshot 2020-01-09 at 14 08 34
  1. Go to Runner -> Info-> URL Types and click to + .
  2. Past the REVERSED_CLIENT_ID in URL SCHEME
Screenshot 2020-01-09 at 14 16 40

ClientId or webClientId is you can found in google-services.json with path client -> oauth_client -> client_type:3 pick that clientId

Right! but i had issue after trying this also so make sure webClientId or iosClientId should be ClientId

GoogleSignin.configure({
      webClientId:"#id.apps.googleusercontent.com",
      ClientId: '#id.apps.googleusercontent.com', // this is little guy sometimes you need
      offlineAccess: false
    }

Its working for me fine!

what worked for me was to change the webClientId key to clientID

My issue was solved by adding this lines in “viewDidAppear” GIDSignIn* signIn = [GIDSignIn sharedInstance]; [GlobalObj sharedInstance].delegate=self; signIn.shouldFetchBasicProfile = YES; signIn.clientID= @“XXXXXXXXXXXXX”; signIn.scopes = @[ @“profile”, @“email” ]; signIn.delegate = self; signIn.uiDelegate = self;