Ionic 2 cli command “ ionic emulate ios --livereload” not working on iOs 9

一笑奈何 提交于 2019-12-14 03:03:07

问题


So I am trying out Ionic 2. I found out this Ionic Cli command does not work:

ionic emulate ios --livereload

or

ionic emulate ios --lc

It show "Setup Live Reload" in the log but the app just hang in the opening splash screen. Can not find further error in the log (no error output), but the whole thing is frozen. It work without the -lc flag. So if I just run

ionic emulate ios

It works and the app launch. Anyone know a workaround for this? I am on iOs 9.3.


回答1:


I faced the same issue and these are the steps I followed:

  1. Open the root folder of the app.
  2. Find config.xml file.
  3. Look for the line <allow-navigation href="" />
  4. Change it to <allow-navigation href="http://YOUR_IP_ADDRESS:8100/" /> and save. Eg. <allow-navigation href="http://192.168.118.25:8100/" />
  5. Now run the ionic emulate ios -lcs command again.

This time it should work perfectly on your simulator.




回答2:


excute ionic address first
then excute ionic emulate ios --livereload
after some step, you have to choose a IP. Choose what ever you want and it will work!



来源:https://stackoverflow.com/questions/38065902/ionic-2-cli-command-ionic-emulate-ios-livereload-not-working-on-ios-9

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!