title: App crashes in ios simulator when trying to use Phone auth in react-native firebase
body: <p>I've followed the docs and did the necessary settings but the app crashes while launch. I'm not able to figure out the problem as to why this is occurring. any one who worked with rnfirebase? facing this issue?</p>
  
  <pre><code>import React, { Component } from 'react';
  import { View, Button, Text, TextInput, Image } from 'react-native';
  
  import firebase from 'react-native-firebase';
  
  const successImageUri = 'https://cdn.pixabay.com/photo/2015/06/09/16/12/icon-803718_1280.png';
  
  export default class App extends Component {
    constructor(props) {
      super(props);
      this.unsubscribe = null;
      this.state = {
        user: null,
        message: '',
        codeInput: '',
        phoneNumber: '+44',
        confirmResult: null
      };
      firebase.initializeApp({
        apiKey: 'AIzaSyAvKPtsqqqGjkGLkXD8BeqOR6GwJaI2AcE',
        appId: '1:170852024080:ios:9bb19d2f74715186',
        messagingSenderId: '170852024080',
        projectId: 'chatapp-7c693',
        authDomain: 'chatapp-7c693.firebaseapp.com',
        databaseURL: 'https://chatapp-7c693.firebaseio.com',
        storageBucket: 'chatapp-7c693.appspot.com'
      });
    }
  
    componentDidMount() {
      this.unsubscribe = firebase.auth().onAuthStateChanged(user =&gt; {
        if (user) {
          this.setState({ user: user.toJSON() });
        } else {
          // User has been signed out, reset the state
          this.setState({
            user: null,
            message: '',
            codeInput: '',
            phoneNumber: '+44',
            confirmResult: null
          });
        }
      });
    }
  
  //This is the example from the docs, so it must work
  
    componentWillUnmount() {
      if (this.unsubscribe) this.unsubscribe();
    }
  
    signIn = () =&gt; {
      const { phoneNumber } = this.state;
      this.setState({ message: 'Sending code ...' });
  
      firebase
        .auth()
        .signInWithPhoneNumber(phoneNumber)
        .then(confirmResult =&gt; this.setState({ confirmResult, message: 'Code has been sent!' }))
        .catch(error =&gt;
          this.setState({ message: `Sign In With Phone Number Error: ${error.message}` })
        );
    };
  
    confirmCode = () =&gt; {
      const { codeInput, confirmResult } = this.state;
  
      if (confirmResult &amp;&amp; codeInput.length) {
        confirmResult
          .confirm(codeInput)
          .then(user =&gt; {
            this.setState({ message: 'Code Confirmed!' });
          })
          .catch(error =&gt; this.setState({ message: `Code Confirm Error: ${error.message}` }));
      }
    };
  
    signOut = () =&gt; {
      firebase.auth().signOut();
    };
  
    renderPhoneNumberInput() {
      const { phoneNumber } = this.state;
  
      return (
        &lt;View style={{ padding: 25 }}&gt;
          &lt;Text&gt;Enter phone number:&lt;/Text&gt;
          &lt;TextInput
            autoFocus
            style={{ height: 40, marginTop: 15, marginBottom: 15 }}
            onChangeText={value =&gt; this.setState({ phoneNumber: value })}
            placeholder={'Phone number ... '}
            value={phoneNumber}
          /&gt;
          &lt;Button title="Sign In" color="green" onPress={this.signIn} /&gt;
        &lt;/View&gt;
      );
    }
  
    renderMessage() {
      const { message } = this.state;
  
      if (message.length) return null;
  
      return &lt;Text style={{ padding: 5, backgroundColor: '#000', color: '#fff' }}&gt;{message}&lt;/Text&gt;;
    }
  
    renderVerificationCodeInput() {
      const { codeInput } = this.state;
  
      return (
        &lt;View style={{ marginTop: 25, padding: 25 }}&gt;
          &lt;Text&gt;Enter verification code below:&lt;/Text&gt;
          &lt;TextInput
            autoFocus
            style={{ height: 40, marginTop: 15, marginBottom: 15 }}
            onChangeText={value =&gt; this.setState({ codeInput: value })}
            placeholder={'Code ... '}
            value={codeInput}
          /&gt;
          &lt;Button title="Confirm Code" color="#841584" onPress={this.confirmCode} /&gt;
        &lt;/View&gt;
      );
    }
  
    render() {
      const { user, confirmResult } = this.state;
      return (
        &lt;View style={{ flex: 1 }}&gt;
          {!user &amp;&amp; !confirmResult &amp;&amp; this.renderPhoneNumberInput()}
  
          {this.renderMessage()}
  
          {!user &amp;&amp; confirmResult &amp;&amp; this.renderVerificationCodeInput()}
  
          {user &amp;&amp; (
            &lt;View
              style={{
                padding: 15,
                justifyContent: 'center',
                alignItems: 'center',
                backgroundColor: '#77dd77',
                flex: 1
              }}
            &gt;
              &lt;Image
                source={{ uri: successImageUri }}
                style={{ width: 100, height: 100, marginBottom: 25 }}
              /&gt;
              &lt;Text style={{ fontSize: 25 }}&gt;Signed In!&lt;/Text&gt;
              &lt;Text&gt;{JSON.stringify(user)}&lt;/Text&gt;
              &lt;Button title="Sign Out" color="red" onPress={this.signOut} /&gt;
            &lt;/View&gt;
          )}
        &lt;/View&gt;
      );
    }
  }
  </code></pre>
  
  <blockquote>
    <p>can someone help? ive checked the docs again ..but no help ?idk
    what more details I should add..this is my first question on stack
    over flow..didnt know it was this annoying to ask a question...
        I tried the web firebase sdk and can use the anonymous signin.. but I need phone auth which I'm not able to accomplish as it has different setups for ios and android ...rnfirebase is suppose to same as the web sdk</p>
  </blockquote>