title: React Native handle IOS permissions for FCM messaging
body: <p>I integrated FCM messaging to my React Native app.</p>
  
  <p>In my App component i tried to grant permissions by asking the user if he accept to get notifications or not .</p>
  
  <p>My question is, am i using to right way to grant permissions? </p>
  
  <p>I use async componentDidMount to implement the function requestPermission :</p>
  
  <pre><code>import firebase from '@react-native-firebase/app'
  import messaging from '@react-native-firebase/messaging'
  
  async componentDidMount () {
   // ......
      const granted = messaging().requestPermission()
      if (granted) {
    console.log('User granted messaging permissions!')
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
    firebase
      .messaging()
      .getToken()
      .then(fcmToken =&gt; {
        if (fcmToken) {
          // user has a device token
          console.log('fcm')
          console.log(fcmToken)
        } else {
          // user doesn't have a device token yet
          console.log('error')
        }
      })
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
  } else {
    console.log('User declined messaging permissions :(')
  }
  }
  
  I get the FCM generated token, and i can send message using Postman to the device using this token. How can i be sure that the permissions are always granted and i can get the token from every device ? 
  </code></pre>