title: React Navigation app crashes on release mode or via ipa on ios but works fine in debug mode
body: <p>React native App with <a href="https://reactnavigation.org/docs/en/3.x/getting-started.html" rel="nofollow noreferrer">react navigation library</a> crashes on ios simulator and devices in release mode or via ipa using Xcode but runs fine on debug mode and also works fine in android.</p>
  
  <pre><code>React Native  - 0.56.0
  React Navigation - 3.12.1
  Used NPM
  </code></pre>
  
  <p>Here is the link to codebase :  <a href="https://www.google.com/url?q=https://github.com/vikassahutech/ReactNavigationProject.git&amp;sa=D&amp;source=hangouts&amp;ust=1568994195895000&amp;usg=AFQjCNHChBAkhb6hqpDXGkFsR2sv9GXNmg" rel="nofollow noreferrer">https://www.google.com/url?q=https://github.com/vikassahutech/ReactNavigationProject.git&amp;sa=D&amp;source=hangouts&amp;ust=1568994195895000&amp;usg=AFQjCNHChBAkhb6hqpDXGkFsR2sv9GXNmg</a></p>
  
  <p>Package / configurations used:</p>
  
  <pre><code>Package.json :
  
  {
  "name": "SampleProject",
  "version": "0.0.1",
  "private": true,
  "scripts": {
  "start": "node node_modules/react-native/local-cli/cli.js start",
  "test": "jest",
  "android": "cd ./android &amp;&amp; ./gradlew app:assembleDebug &amp;&amp; ./gradlew installDebug"
  },
  "dependencies": {
  "@babel/runtime": "^7.5.5",
  "react": "^16.9.0",
  "react-native": "0.56.0",
  "react-native-gesture-handler": "1.0.15",
  "react-native-reanimated": "^1.2.0",
  "react-navigation": "^3.12.1"
  },
  "devDependencies": {
  "babel-jest": "24.9.0",
  "babel-polyfill": "^6.26.0",
  "babel-preset-react-native": "5.0.2",
  "jest": "24.9.0",
  "react-test-renderer": "16.4.1"
  },
  "jest": {
  "preset": "react-native"
  }
  }
  </code></pre>
  
  <p>Here are console messages:</p>
  
  <pre><code>2019-09-17 18:48:36.339 [error][tid:com.facebook.react.JavaScript] TypeError: undefined is not an object (evaluating 'e.default')
  
  This error is located at:
  in r
  in t
  in RCTView
  in RCTView
  in n
  in n
  in t
  in t
  in RCTView
  in e
  in n
  in n
  in r
  in r
  in t
  in n
  in n
  in RCTView
  in e
  in a
  in RCTView
  in RCTView
  in t
  2019-09-17 18:48:36.344 [error][tid:com.facebook.react.JavaScript] TypeError: TypeError: undefined is not an object (evaluating 'e.default')
  
  This error is located at:
  in r
  in t
  in RCTView
  in RCTView
  in n
  in n
  in t
  in t
  in RCTView
  in e
  in n
  in n
  in r
  in r
  in t
  in n
  in n
  in RCTView
  in e
  in a
  in RCTView
  in RCTView
  in t
  
  This error is located at:
  in n
  in RCTView
  in e
  in a
  in RCTView
  in RCTView
  in t
  2019-09-17 18:48:36.346 [error][tid:com.facebook.react.JavaScript] TypeError: TypeError: undefined is not an object (evaluating 'e.default')
  
  This error is located at:
  in r
  in t
  in RCTView
  in RCTView
  in n
  in n
  in t
  in t
  in RCTView
  in e
  in n
  in n
  in r
  in r
  in t
  in n
  in n
  in RCTView
  in e
  in a
  in RCTView
  in RCTView
  in t
  
  This error is located at:
  in n
  in RCTView
  in e
  in a
  in RCTView
  in RCTView
  in t
  2019-09-17 18:48:36.363 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: TypeError: TypeError: undefined is not an object (evaluating 'e.default')
  
  This error is located at:
  in r
  in t
  in RCTView
  in RCTView
  in n
  in n
  in t
  in t
  in RCTView
  in e
  in n
  in n
  in r
  in r
  in t
  in n
  in n
  in RCTView
  in e
  in a
  in RCTView
  in RCTView
  in t
  
  This error is located at:
  in n
  in RCTView
  in e
  in a
  in RCTView
  in RCTView
  in t
  libc++abi.dylib: terminating with uncaught exception of type NSException
  </code></pre>