ios - React-Native Firebase Phone Auth 卡住 iPhone

标签 ios firebase react-native firebase-authentication react-native-firebase

我想在 react-native 中通过 phoneNumber 登录用户。在 Android 上,这段代码片段工作得很好。但是在 iOS 上,当我启动这个功能时,模拟器总是卡住。我正在尝试使用此代码 Auth-Example我正在使用 react-native-firebase 库。

  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 }
        )
      );
  }

最佳答案

遇到相同问题的人的解决方案:

确保为您的 APN 指定的名称与应用名称相匹配

关于ios - React-Native Firebase Phone Auth 卡住 iPhone,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49136308/

相关文章:

javascript - 如何在 map 上创建一个覆盖标记,它保持在 react-native 的屏幕中心

javascript - 如何在 native react 中调用递归异步函数?

ios - iTunes Connect - 无法为预发布应用邀请 "internal testers"

firebase - Firestore 文档 ID 的有效字符

firebase - 我应该尽量不在 LocalStorage 上保存 Firebase Auth

java - 谷歌使用 Firebase 登录时的唯一 ID

react-native - @react-native-picker/picker 导致我的应用程序崩溃 (android)

ios - 调整 UIButton 上的背景图像大小

ios - 从 NSString 中提取数字的最快且最高效的方法是什么?

objective-c - 使用位操作设置一些标志的最佳实践