简体   繁体   中英

React-Native GoogleSignin.SIGN_IN_CANCELLED

I working with react-native firebase sign in with Google from this package here:

https://github.com/react-native-google-signin/google-signin#project-setup-and-initialization

using: yarn add @react-native-google-signin/google-signin

It works perfectly on Android logging me in as desired however it is not working at all on iOS and have come accross the following error

ERROR TypeError: null is not an object (evaluating 'RNGoogleSignin.SIGN_IN_CANCELLED')

I cannot understand why this is happening on iOS but not android:

process:

1. yarn add @react-native-google-signin/google-signin
2. cd ios
3. pod install

- I have updated the GoogleService-Info.plist
- I have the enabled "sign in with Apple"
- The URL types have been update with reverse ID

Any help is welcome!

Just managed to solve this issue by changing the package number from

"@react-native-google-signin/google-signin": "^8.0.0",

to this:

"@react-native-google-signin/google-signin": "7.2.2",

hope this helps anyone who needs it!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM