小编Mat*_*s99的帖子

错误:未创建 Firebase 应用程序“[DEFAULT]” - 调用 firebase.initializeApp()

我需要使用 Firebase 进行电话身份验证,但每次我单击将代码发送给用户的按钮时,都会显示此错误,这可能很容易解决,但由于我对 Firebase 和 React Native 的了解不是很深,所以我无法找到解决方案。

这是我的代码:

export default class VerifyCell extends Component{
    static navigationOptions = {header: null}

    constructor(props){
        super(props);
        this.state = {
            code: '',
        };
    }

    render(){

        const celular = this.props.navigation.getParam('celular');

        return (
            <ScrollView style={styles.container}>
                <HeaderIcon type='MaterialCommunityIcons' name='message-processing'/>
                    <Text style={styles.titulo}>Phone Verification</Text>
                    <Text style={styles.dica}>Insert the code that has been sent to you below</Text>

                    <FormItem onChangeText={ (code) => this.setState({code}) } texto='Code'/>


                    <View style={{marginBottom: '40%'}}></View>

                    <GradientButton texto='Send code' onPress={async () => {
                        const confirmation = await auth().signInWithPhoneNumber('+55 19995661551');
                    }}/>


                <View …
Run Code Online (Sandbox Code Playgroud)

firebase react-native firebase-authentication

5
推荐指数
1
解决办法
3万
查看次数

如何将渐变过滤器应用于图标?

我需要在我的Icon.

我如何实现这一目标?

dart flutter

3
推荐指数
1
解决办法
1545
查看次数