OGeek|极客世界-中国程序员成长平台

标题: ios - React-Native Firebase Phone Auth 卡住 iPhone [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 19:49
标题: ios - React-Native Firebase Phone Auth 卡住 iPhone

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

  openPhoneVerification() {
    firebase
      .auth()
      .signInWithPhoneNumber(this.state.phoneNumber)
      .then(confirmResult =>
        this.props.navigation.navigate("honeVerification", {
          confirmResult
        })
      )
      // Wrong number - https://firebase.google.com/docs/reference/js/firebase.auth.Auth#signInWithPhoneNumber
      .catch(error =>
        Alert.alert(
          "Number not valid",
          "lease check your number and type in again",
          [
            {
              text: "OK",
              style: "cancel"
            }
          ],
          { cancelable: true }
        )
      );
  }



Best Answer-推荐答案


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

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

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






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4