Every time I use Yarn everything blows up, which are the instructions given by the react-native-community.
I've tried just doing the npm install --save and then use the link command but nothing works so far.
What am i doing wrong? and how do i fix this.
onsole.error: "RN GoogleSignin native module is not correctly linked. Please read the readme, setup and troubleshooting instructions carefully or try manual linking."
I got this solved by just installing pos for the same:
Step 1: Goto the ios folder inside the app, Check for the pod file it must be having a line
pod 'RNGoogleSignin', :path => '../node_modules/react-native-google-signin'
if it is not pleased run the command :
react-native link,
The above line will appear.
Step 2: Now run the following command.
pod install
I gave up on THE react googlesignin stuff after 2 days of tinkering.. I just followed the firebase guide and expo guide and everything works.
Expo google login gets the credentials then firebase checks the crednetials and logs you in.
if you are doing a firebase googlelogin thing and you already have firebase setup you can do something
googleLogin = async () => {
try {
const result = await Expo.Google.logInAsync({
androidClientId: "Your Client ID",
//iosClientId: YOUR_CLIENT_ID_HERE, <-- if you use iOS
scopes: ["profile", "email"]
})
if (result.type === "success") {
const credential = firebase.auth.GoogleAuthProvider.credential(result.idToken, result.accessToken);
firebase.auth().signInAndRetrieveDataWithCredential(credential).then(function(result){
console.log(result);
});
this.props.navigation.navigate('Where you want to go');
} else {
console.log("cancelled")
}
} catch (e) {
console.log("error", e)
}
}
For IOS,Please add this in your Pod file and do pod install before run-ios:
pod 'RNGoogleSignin', :path => '../node_modules/@react-native-community/google-signin'
I faced similar issue while manually upgrading react native from 0.59.9 to 0.62.2. I have also uninstalled react-native-google-signin and installed @react-native-community/google-signin before making Pod File change.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With