ionic Failed to load webpage with error: Could not connect to the server

前端 未结 8 1759
无人及你
无人及你 2021-02-03 18:20

I\'m having an issue with Ionic projects after updating to Xcode 6 and iOS 8.

When trying to run projects I get the following error in Xcode:

Failed to l         


        
相关标签:
8条回答
  • 2021-02-03 19:03

    I encountered this issue when I tried to run my Ionic 4 app on an iOS device.

    What solved it for me, was running the dev server on all network interfaces using the --address option, for example:

    ionic cordova run ios --address=0.0.0.0 --debug --consolelogs -l

    0 讨论(0)
  • 2021-02-03 19:09

    I had this same issue using XCode9.3 and ionic3. Turns out that the issue was caused by missing configurations in "config.xml" needed for WKWebview to function properly. I added the following snippet to my config.xml, before deleting the "platforms/ios" folder and running "ionic cordova build ios --prod" again.

     <allow-navigation href="http://localhost:8080/*" />
        <feature name="CDVWKWebViewEngine">
            <param name="ios-package" value="CDVWKWebViewEngine" />
        </feature>
        <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />

    See link here for a more detailed explanation from the ionic team.

    0 讨论(0)
提交回复
热议问题