google-services icon indicating copy to clipboard operation
google-services copied to clipboard

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

Open vu0tran opened this issue 11 years ago • 28 comments

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>

vu0tran avatar Oct 06 '15 09:10 vu0tran

i got the same trouble

masbenx avatar Oct 09 '15 07:10 masbenx

up up

pratamawijaya avatar Oct 09 '15 08:10 pratamawijaya

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

vu0tran avatar Oct 09 '15 11:10 vu0tran

I have the same problem, but I am not using that scheme. It still give me this error...

fabiofai avatar Jul 22 '16 03:07 fabiofai

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!

johnn82 avatar Dec 10 '16 17:12 johnn82

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

mwaqas01 avatar Jan 07 '17 17:01 mwaqas01

what if i already have a GoogleService-Info.plist s for fBSDKLogin , and know am trying to make it work with GoogleSignIn??

elbuenyuz avatar Jan 26 '17 00:01 elbuenyuz

**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

Sweetog avatar May 22 '17 01:05 Sweetog

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...

DSTOLF avatar Dec 08 '17 01:12 DSTOLF

@Sweetog it's working fine... Thank You.

patelhari avatar Jan 31 '18 13:01 patelhari

If perhaps meanwhile you change your App ID and you have your API key restricted to that, don't forget to update it! My mistake was that even that I had created a new App ID restricted to my new App ID, I had not updated it on the app URL scheme.

RicardoBarroso avatar May 28 '18 17:05 RicardoBarroso

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;

swapniltoo avatar Jun 27 '18 07:06 swapniltoo

Add MAIN info.plist add new URL type screenshot 2018-10-04 at 11 17 16 am

Mitesh-Mewada avatar Oct 04 '18 05:10 Mitesh-Mewada

I have this problem too, and I have solved it . The key in developer background your apply all in used in IOS , you can look at the example

clientID = "xxxxx-xxxx.apps.googleusercontent.com" url schemes = "com.googleusercontent.apps.xxxx-xxxxxx

shengrenjin avatar Nov 27 '18 02:11 shengrenjin

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

MartinhoMCM avatar Jan 09 '20 13:01 MartinhoMCM

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 👍

mclean25 avatar Feb 08 '20 22:02 mclean25

in my case i did'nt configure the firebase.

mjgul avatar Mar 28 '20 19:03 mjgul

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

CyrusZei avatar Jun 16 '20 22:06 CyrusZei

For me I have to add these value of URL Scheme in the "Property List" not in "Code" mode of info.plist.

Why? After two hours I don't care.

emtt avatar Jul 02 '20 23:07 emtt

Screenshot 2021-01-15 at 12 45 28

In my case, I forgot to add Items for both Google and Facebook OAuth.

bogdanbgd7 avatar Jan 15 '21 11:01 bogdanbgd7