title: Using OneSignal.registerForPushNotifications, then approve not registering
body: <p>I am user OneSignal in combination with React-Native to setup the push notifications. In my app, users need to be logged in, in order receive push notifications (or to give permission).</p>
  
  <p>The issue that I am having, is that when the user logs in, they get my custom popup, asking if they would like to receive messages. If they click yes, they iOS popup shows, asking for permission.</p>
  
  <p>When I click yes again, and check the OneSignal users dashboard, to see which users have registered for the push notifications. I see mine, but as opted out, which is not correct.</p>
  
  <p>So I am wondering if there is a bug in the code of OneSignal (already in contact with them, but is going slow) or my code is wrong.</p>
  
  <p>I am using;</p>
  
  <ul>
  <li>React-native 0.56</li>
  <li>react-native-onesignal: 3.2.7</li>
  </ul>
  
  <p>The following code is what I currently have:</p>
  
  <pre class="lang-js prettyprint-override"><code>componentWillMount() {
      OneSignal.init("{key}", {kOSSettingsKeyAutoPrompt : false});
      AsyncStorage.multiGet(['firstTime', 'subscribed']).then((response) =&gt; {
          this.setState({
              firstTime: JSON.parse(response[0][1]) != null ? JSON.parse(response[0][1]) : true,
              subscribed: JSON.parse(response[1][1]) != null ? JSON.parse(response[1][1]) : false
          });
          setTimeout(() =&gt; {
              if (Platform.OS === 'android' &amp;&amp; !this.state.subscribed &amp;&amp; this.state.firstTime) {
                  OneSignal.setSubscription(false);
              }
          }, 200);
      });
      OneSignal.addEventListener('received', this.onReceived);
      OneSignal.addEventListener('opened', this.onOpened);
      OneSignal.addEventListener('ids', this.onIds);   
  }
  componentDidMount () {
      NetInfo.isConnected.addEventListener('connectionChange', this.handleConnectivityChange);
      AsyncStorage.getItem('firstTime').then((result) =&gt; {
          !this.isCancelled &amp;&amp; this.setState({
              firstTime: JSON.parse(result) != null ? JSON.parse(result) : true
          })
      });
  
      firebase.auth().onAuthStateChanged((user) =&gt; {
          if (user) {
              setTimeout(() =&gt; {
                  if (!this.state.subscribed &amp;&amp; this.state.firstTime) {
                      Alert.alert(
                          I18n.t('notifications title'),
                          I18n.t('notifications subtitle'),
                          [
                              {text: I18n.t('notifications no'), onPress: () =&gt; {
                                  setTimeout(() =&gt; {
                                      AsyncStorage.multiSet([['firstTime', JSON.stringify(false)], ['subscribed', JSON.stringify(false)]]);
                                  }, 100)
                              }, style: 'cancel'},
                              {text: I18n.t('notifications ok'), onPress: () =&gt; {
                                  if (Platform.OS === 'android') {
                                      OneSignal.setSubscription(true);
                                  }else if (Platform.OS === 'ios') {
                                      // OneSignal.setLogLevel(6, 0);
                                      OneSignal.registerForPushNotifications();
                                  }
                                  setTimeout(() =&gt; {
                                      AsyncStorage.multiSet([['firstTime', JSON.stringify(false)], ['subscribed', JSON.stringify(true)]]);
                                  }, 100)
                              }}
                          ],
                          { cancelable: false }
                      )
                  }
              }, 500)
          }else{
              OneSignal.setSubscription(false);
          }
          SplashScreen.hide();
      });
  };
  </code></pre>
  
  <p>Hope you guys can help out.</p>
  
  <p>Cheers,</p>