title: React Native Onesignal OnPressed notification is not working in release build
body: <p>I have created a react native app in this I have to add the push notification that has been done by me and for push notification, I have used the react-native-onesignal package. but there is some issue with the notification, in my app when I send the notification the app receives the notification but when I try to open the notification then the app stuck (hangs on the current screen) also I have added the Onpress event listener for the one signal notification. The notifications onpressed event listener is not working properly in my app. with this listener I have to open my notification page.</p>
  
  <p>The code i have added is this</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>OneSignal.addEventListener('opened', (e) =&gt; this.onOpened(e, this));</code></pre>
  </div>
  </div>
  </p>
  
  <p>and the function is </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>onOpened(openResult, component) {
    component.props.navigation.navigate('allnotification'); 
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>if anyone knows the solution please help.</p>
  
  <p>Thanks in advance.</p>