React-Native GoogleSignin.SIGN_IN_CANCELLED

问题描述 投票:0回答:2

我使用react-native firebase,从这里的包中使用Google登录:

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

使用:

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

它在 Android 上完美运行,可以根据需要让我登录,但它在 iOS 上根本不起作用,并且遇到以下错误

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

我不明白为什么这种情况发生在 iOS 上而不是 Android 上:

流程:

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

欢迎任何帮助!

firebase react-native firebase-authentication expo google-signin
2个回答
7
投票

刚刚通过更改包裹编号解决了这个问题

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

对此:

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

希望对有需要的人有帮助!


0
投票

@react-native-google-signin/google-signin 在博览会(博览会开始)中不起作用。它可以在模拟器或设备(npx react-native start)中运行。

© www.soinside.com 2019 - 2024. All rights reserved.