title: Ionic Capacitor (Angular) blank page ios when building from XCode
body: <p>I'm building an app with Ionic 6 + capacitor. It works fine when testing on the browser and the Android build. However, when I try to build it using XCode it just doesn't work: it only shows a blank page.</p>
  <p>If I run the command <code>ionic capacitor run ios -l --external</code> from Webstorm, the iphone emulator starts and everything works fine. If I open the project with XCode and click the play button, it shows the emulator with a blank page.</p>
  <p>My <code>capacitor.config</code> file is:</p>
  <pre><code>{
      &quot;appId&quot;: &quot;com.ionic.app&quot;,
      &quot;appName&quot;: &quot;ionic-app&quot;,
      &quot;webDir&quot;: &quot;www&quot;,
      &quot;bundledWebRuntime&quot;: false,
  }
  </code></pre>
  <p>The console of XCode when starting the app is:</p>
  <pre><code>2021-12-30 17:09:09.817042+0100 App[22182:360758] KeyboardPlugin: resize mode - native
  ⚡️  Loading app at capacitor://localhost...
  ⚡️  [log] - Angular is running in development mode. Call enableProdMode() to enable production mode.
  ⚡️  WebView loaded
  ⚡️  To Native -&gt;  App addListener 101717497
  </code></pre>
  <p>Notice that localhost doesn't show the usual 8100 port.</p>
  <p>The problem is that when I run the app via XCode, the angular server is not starting, hence the app is only a blank page. If I start the server via <code>ng run app:serve --host=0.0.0.0 --port=8100</code> and I add the following config to <code>capacitor.config</code> in XCode:</p>
  <pre><code>&quot;server&quot;: {
          &quot;url&quot;: &quot;http://localhost:8100&quot;
      }
  </code></pre>
  <p>Then everything works fine again.</p>
  <p>Is there any command or any capacitor config I would need to include to start the angular server when the app starts? Or I don't need to start it and the problem may be somewhere else?</p>
  <p>Thanks in advance</p>
  <p>UPDATE:
  The problems seems to be in the auth guard. I still have to find out what exactly causing the problem, but without the guard the app works fine.</p>