[英]Why blank Ionic capacitor App running on iOS return this Error: Could not connect to the server
I'am trying to run a clean blank new Ionic app with capcitor.我正在尝试使用 capcitor 运行一个干净的空白新Ionic 应用程序。
I went step-by-step through this tutorial: https://capacitor.ionicframework.com/docs/ios/我逐步完成了本教程: https : //capacitor.ionicframework.com/docs/ios/
Xcode build the app succefully but when the app opens it shows a blank white screen after the splash screen. Xcode 成功构建了应用程序,但是当应用程序打开时,它在启动画面后显示一个空白的白屏。
In the Xcode logs I see this:在 Xcode 日志中,我看到了这个:
2020-03-13 14:34:44.439927+0200 App[7606:2360127] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/260D9E68-0132-4886-9065-8CC3F016E06C/Library/Cookies/Cookies.binarycookies
Loading network plugin
2020-03-13 14:34:44.737344+0200 App[7606:2360127] CAPKeyboard: resize mode - native
⚡️ Loading app at http://localhost:8101...
2020-03-13 14:34:44.871413+0200 App[7606:2360127] [Process] kill() returned unexpected error 1
Reachable via WiFi
2020-03-13 14:34:44.875737+0200 App[7606:2360127] [Process] kill() returned unexpected error 1
APP ACTIVE
2020-03-13 14:34:44.883121+0200 App[7606:2360127] [Process] kill() returned unexpected error 1
⚡️ WebView failed provisional navigation
⚡️ Error: Could not connect to the server.
2020-03-13 14:34:44.954466+0200 App[7606:2360127] [Process] kill() returned unexpected error 1
SplashScreen.hideSplash: SplashScreen was automatically hidden after default timeout. You should call `SplashScreen.hide()` as soon as your web app is loaded (or increase the timeout). Read more at https://capacitor.ionicframework.com/docs/apis/splash-screen/#hiding-the-splash-screen
System setup:系统设置:
I'v been creating and deleting apps for the past few days and I'm absolutly lost.过去几天我一直在创建和删除应用程序,我完全迷失了。
Any help would be good, Thanks in advance.任何帮助都会很好,提前致谢。
Lord!主!
What an embracing bug,多么包容的错误,
The issue was I ran -host=0.0.0.0 and not --host=0.0.0.0.问题是我跑了-host=0.0.0.0 而不是--host=0.0.0.0。
For anyone facing this issue I recommend using --external and not --host对于任何面临此问题的人,我建议使用 --external 而不是 --host
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.