title: React Native on iOS: Module AppRegistry is not a registered callable module
body: <p>I'm building a React Native app. On iOS after implementing camera features, the iOS app suddenly decided to crash.</p>
  
  <p>I get the following error:</p>
  
  <pre><code>2018-10-29 14:48:26.353 [error][tid:com.facebook.react.JavaScript] undefined is not an object (evaluating 'CameraManager.Aspect')
  2018-10-29 14:48:26.356 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: undefined is not an object (evaluating 'CameraManager.Aspect')
  2018-10-29 14:48:26.368 [error][tid:com.facebook.react.JavaScript] Module AppRegistry is not a registered callable module (calling runApplication)
  2018-10-29 14:48:26.379 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Module AppRegistry is not a registered callable module (calling runApplication)
  </code></pre>
  
  <p>I found several threads about this problem and did all the respective solutions. I did run <code>react-native link</code>, I restarted Metro, I cleaned my build folder and here is my <code>index.js</code> (I'm also using React Native Firebase, but when I added that, everything still worked...):</p>
  
  <pre><code>/** @format */
  
  import { AppRegistry } from "react-native";
  import App from "./app/App";
  import { name as appName } from "./app.json";
  import bgMessaging from "./app/services/fcm";
  
  // New task registration
  AppRegistry.registerHeadlessTask("RNFirebaseBackgroundMessage", () =&gt; bgMessaging);
  // Current main application
  AppRegistry.registerComponent(appName, () =&gt; App);
  </code></pre>
  
  <p>What could be the reason for this?</p>