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

前端 未结 8 1758
无人及你
无人及你 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 18:45

    This error may also occur if you open the project using Xcode after used the live debugging with the emulator

    ionic cordova emulate ios --livereload -lc

    To solve the issue, close Xcode and build the project again using

    ionic cordova build ios
    

    Then build and run using Xcode.

    0 讨论(0)
  • 2021-02-03 18:48

    I found a solution, i hope it helps: https://github.com/glebmachine/cordova-plugin-ionic/commit/7c095a45a13f7349e93f14a3057153775109f635

    To install from my fork: cordova plugin add https://github.com/glebmachine/cordova-plugin-ionic.git#v4

    0 讨论(0)
  • 2021-02-03 18:50

    I have run the server and simulator and again am trying to update the app on the device.

    Then I had the same problem

    I stoped my simulator and re builded the app and opened the project.xcodeproj file with Xcode and run it on the device.This worked for me

    0 讨论(0)
  • 2021-02-03 18:54

    I had the same problem.

    I opened the ios project in the platform folder via Xcode, but I forgot that the codebase in the Xcode folder was not up to date and therefore broken.

    To get the new code in your Xcode project use the command:

    ionic cordova prepare ios
    

    If your problem is rooted in the same as mine this should help.

    0 讨论(0)
  • 2021-02-03 18:55

    In our case (under IONIC 5) the entry

    "server": {
        "url": "http://192.168.0.6:8100"
      }
    

    in the file "capacitor.config.json" had to be deleted. Afterwards the app ran smoothly on mobile devices.

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

    I had the same issue, reinstalling the cordova-plugin-ionic-webview worked for me.

    cordova plugin rm cordova-plugin-ionic-webview
    cordova plugin add cordova-plugin-ionic-webview
    
    0 讨论(0)
提交回复
热议问题