newkid
newkid

Reputation: 1458

No active configuration. Make sure GIDClientID is set in Info.plist

I am very new to app development. I was trying to configure my GoogleSignInButton Callback function.

I get the error:

No active configuration. Make sure GIDClientID is set in Info.plist.

However, my Info.plist defines GIDClientID along with the value generated as advised here

enter image description here

OS: Version 13.0 Beta

Xcode: Version 14.1 beta 3

Upvotes: 8

Views: 16209

Answers (7)

nantitv
nantitv

Reputation: 3733

You would need to add your GIDClientID in [my_project]/ios/Runner/Info.plist as mentioned here

<key>GIDClientID</key>
<string>[YOUR IOS CLIENT ID]</string>

Upvotes: -1

Uch
Uch

Reputation: 244

Using React Native 75 and "@react-native-google-signin/google-signin" 13.0+ For me the issue was I needed to remember to always call .configure before calling signIn. Ultimately it had nothing to do with my info plist

GoogleSignin.configure({
        webClientId:
          "My web client id - found here for rnfirebase https://rnfirebase.io/auth/social-auth#google",
      });
await GoogleSignin.hasPlayServices();
const { data } = await GoogleSignin.signIn();
... rest of your code

Upvotes: 0

Wes Chua
Wes Chua

Reputation: 1086

In order to resolve this issues, you don't need to add anything into the info.plist. you need to setup GIDSignIn.sharedInstance.configuration = config

https://github.com/WesCSK/SwiftUI-Firebase-Authenticate-Using-Google-Sign-In/blob/starting/README.md#updated-steps-for-v700-of-google-signin

guard let clientID = FirebaseApp.app()?.options.clientID else { return }
        
// Create Google Sign In configuration object.
let config = GIDConfiguration(clientID: clientID)
        
GIDSignIn.sharedInstance.configuration = config

....

Upvotes: 25

Tuan Pham
Tuan Pham

Reputation: 129

Don't add new property named "GIDClientID" into the Info.plist of target project, use CLIENT_ID which is defined in GoogleService-Info.plist instead.

Find more details here: https://stackoverflow.com/a/74897652/19683708

Upvotes: 2

Gabriel Ivan
Gabriel Ivan

Reputation: 31

Google documentation at Firebase Login methods is worse than.... So, if you are using 8.6.0 you can use GIDSignIn.sharedInstance.signIn(withPresenting: presentingVC), but add ClientID in Info.plist like here: enter image description here

Regarding the main issue, from your picture I see that you put the URLSchema at GIDClientID, they are a little bit different. Eg. GIDclientID: xxxx-xxxxxx.apps.googleusercontent.com URLSchema: com.googleusercontent.apps.xxxx-xxxxxx.

Try like that.

I get my clientId using this line of debug in my code guard let clientID = FirebaseApp.app()?.options.clientID

Upvotes: 3

Anna
Anna

Reputation: 43

Same error. I'm newbie too, it helped for me to reinstall packages (GoogleSignIn and FirebaseAuth) with older versions (6.0.0 and 8.6.0) so GIDSignIn.sharedInstance.signIn(with: config, presenting: self) is available. This is a temporary solution till we find working way.

Upvotes: 0

Abdullah
Abdullah

Reputation: 393

This changes in google sign is new. Also GIDSignIn.sharedInstance.signIn(with: config, presenting: self) is not available anymore. GIDSignIn.sharedInstance.signIn(withPresenting: presentingVC) replaced it. But I got same error. Hope to someone find an answer

Upvotes: -1

Related Questions