嗨,我在
中收到此错误firebase.auth().signInWithPhoneNumber(phoneNumber)
Error Domain=FIRAuthErrorDomain Code=17057 "User interaction is still ongoing, another view cannot be presented." UserInfo={NSLocalizedDescription=User interaction is still ongoing, another view cannot be presented., FIRAuthErrorUserInfoNameKey=ERROR_WEB_CONTEXT_ALREADY_PRESENTED}
在 RNFirebaseAuth.m 中。
这里有错误
const confirmResult = await firebase.auth().signInWithPhoneNumber(phoneNumber);
if (confirmResult) {
this.setState({
confirmResult,
message: 'Code has been sent!',
step: 2,
}, this.goToEnterOtpScreen());
}
来自 native 模块的非法回调调用。此回调类型仅允许从 native 代码进行单次调用。
"react-native-firebase": "^5.5.4",
pod 'Firebase/Core', '~> 6.3.0'
pod 'Firebase/Auth', '~> 6.3.0'
pod 'Firebase/Database', '~> 6.3.0'
pod 'Firebase/Functions', '~> 6.3.0'
pod 'Firebase/DynamicLinks', '~> 6.3.0'
pod 'Firebase/Firestore', '~> 6.3.0'
pod 'Firebase/Messaging', '~> 6.3.0'
pod 'Firebase/RemoteConfig', '~> 6.3.0'
pod 'Firebase/Storage', '~> 6.3.0'
pod 'Firebase/Performance', '~> 6.3.0'
最佳答案
看起来您调用await的方法不是异步的
关于ios - signInWithPhoneNumber() 在 react native 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57986052/