Hugh Hou
Hugh Hou

Reputation: 2374

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

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.

Upvotes: 1

Views: 1434

Answers (2)

Duannx
Duannx

Reputation: 8726

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!

Upvotes: 0

Akilan Arasu
Akilan Arasu

Reputation: 350

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.

Upvotes: 1

Related Questions