Demo ends up in white screen

Hi everyone, i am a little bit stucked at the very beginning. I am trying to go the full process with a very basic template app, but i am getting white screen even with the built in ionic template apps.

  1. I created an template app (tabs and menu)
  2. git cloned it to my computer
  3. npm install AND ionic serve (and see the result correctly in browser)
  4. then I followed this one: iOS App Development Guide: Xcode Setup to Build and Run iOS Apps
  • ionic capacitor add ios
  • ionic capacitor open ios

try build in xcode, got error (cannot open settings config …), which i fixed with …/ios/app/ pod install

try build in xcode again and the simulator opened only white screen

adding log details

2023-03-09 21:02:48.260636+0100 App[39832:1547522] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")
2023-03-09 21:02:48.260842+0100 App[39832:1547522] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")
2023-03-09 21:02:48.281467+0100 App[39832:1547522] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///.../Library/Developer/CoreSimulator/Devices/F60AE6D5-C083-4CD6-9EAB-263E2F0736E1/data/Containers/Data/Application/9723BD75-FF90-4A48-9C13-2BC330C2EB36/Library/Cookies/io.ionic.starter.binarycookies
⚡️  Loading app at capacitor://localhost...
2023-03-09 21:02:49.263799+0100 App[39832:1547522] [Process] 0x7fd1c580b020 - [pageProxyID=8, webPageID=9, PID=39864] WebPageProxy::didFailProvisionalLoadForFrame: frameID=3, isMainFrame=1, domain=NSCocoaErrorDomain, code=260, isMainFrame=1
⚡️  WebView failed provisional navigation
⚡️  Error: The file “index.html” couldn’t be opened because there is no such file.

Hello, based on the “index.html not found” error, my guess is that the ios project does not syncing up with the web project.

You can try the following steps to fix the issue:

  1. Rebuild your web code:
npm run build
  1. Next, sync your web code with your ios project:
ionic capacitor sync

# or
npx cap sync

You can refer to the related documentation available at the following link:

Hope this information is helpful :smile:

1 Like

thanks for your advice, a moments ago I finally fixed the issue and

I did

  1. ionic build (which I suppose is alias to npm run build in this case

  2. after this I did npx cap run ios and it worked (the same as running the build directly from xcode)

I suppose that npx cap sync was either not necessary or it is implicitly built in the npx cap run ios

2 Likes