title: A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.[ios, xcode]
body: <p>I have android and ios app in react native which both uses webview to show webpage as application.
  Since I had to change package name to deploy it on google play since first one package name was occupied. I changed app.json file and all names in android folder and that's ok.</p>
  <p>Now my question is what I need to change in my ios folder in order to my app work in xcode. I have this error.</p>
  <blockquote>
  <p>Invariant Violation: &quot;RestApp&quot; has not
  been registered. This can happen if:</p>
  <ul>
  <li>Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.</li>
  <li>A module failed to load due to an error and <code>AppRegistry.registerComponent</code> wasn't called.</li>
  </ul>
  </blockquote>
  <p>This is my app.json file</p>
  <pre><code>{
    &quot;name&quot;: &quot;restapphhopp&quot;,
    &quot;displayName&quot;: &quot;RestApphhopp&quot;
  }
  </code></pre>
  <p>Index.js file</p>
  <pre><code>/**
   * @format
   */
  
  import {AppRegistry} from 'react-native';
  import App from './App';
  import {name as appName} from './app.json';
  
  AppRegistry.registerComponent(appName, () =&gt; App);
  </code></pre>