ios - React-Native Firebase Phone Auth 卡住 iPhone
<p><p>我想在 react-native 中通过 phoneNumber 让用户登录。在 Android 上,此代码片段运行良好。但是在 iOS 上,当我启动此功能时,模拟器总是卡住。我正在尝试使用此代码 <a href="https://rnfirebase.io/docs/v3.3.x/auth/phone-auth" rel="noreferrer noopener nofollow">Auth-Example</a>我正在使用 react-native-firebase 库。</p>
<pre><code>openPhoneVerification() {
firebase
.auth()
.signInWithPhoneNumber(this.state.phoneNumber)
.then(confirmResult =>
this.props.navigation.navigate("PhoneVerification", {
confirmResult
})
)
// Wrong number - https://firebase.google.com/docs/reference/js/firebase.auth.Auth#signInWithPhoneNumber
.catch(error =>
Alert.alert(
"Number not valid",
"Please check your number and type in again",
[
{
text: "OK",
style: "cancel"
}
],
{ cancelable: true }
)
);
}
</code></pre></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>遇到相同问题的任何人的解决方案:</p>
<p>确保为您的 APN 指定的名称与应用名称匹配</p></p>
<p style="font-size: 20px;">关于ios - React-Native Firebase Phone Auth 卡住 iPhone,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/49136308/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/49136308/
</a>
</p>
页:
[1]