3
votes

I was trying to integrate GoogleSignin in my react-native app.

But I was getting an exception as:

'Your app is missing support for the following URL schemes[#id.apps.googleusercontent.com]' was thrown while invoking signIn on target RNGoogleSignin with params ( )

I have referred the react-native-google-signin link

Please help. Thanks in advance.

1

1 Answers

1
votes

With reference to react-native-google-signin iOS login issue

and answer of tiberiumihai

'For me I used in JS file #id.apps.usercontent.com instead of #id.apps.googleusercontent.com.

Verify that you have the same URL schemes defined in your INFO.plist and in your js file like this:

await GoogleSignin.configure({
    iosClientId: '#id.apps.googleusercontent.com',
    webClientId: '#id.apps.googleusercontent.com',
    offlineAccess: false
  });

Then in your INFO.plist, the URL should be:

'com.googleusercontent.apps.#id' and '#id.apps.googleusercontent.com' This solved my problem.'

My Answer

I need to add both the url-schemes to Info-plist file, as :

'com.googleusercontent.apps.#id'

and

'#id.apps.googleusercontent.com'

along with the bundle identifier.

This was occurring because I have added ClientId in JS file as given in the link:

GoogleSignin.configure({ 
iosClientId: <FROM DEVELOPER CONSOLE>, // only for iOS 
}).then(() => {
// you can now call currentUserAsync()
});

But it only ask to add the REVERSED_CLIENT_ID

Configure URL types in the Info panel

add a URL with scheme set to your REVERSED_CLIENT_ID (found inside the plist)