Ionic-cli: Not work livereload after adding platform ios

Created on 19 Apr 2016  路  8Comments  路  Source: ionic-team/ionic-cli

_From @tenorok on April 15, 2016 21:26_

Short description of the problem:

Not work livereload after adding platform ios.

What behavior are you expecting?

Livereload should work.

Steps to reproduce:

$ ionic start blankApp blank
$ cd blankApp/
$ ionic platform remove ios // It's important step!
$ ionic platform add ios
$ ionic build ios
$ ionic emulate ios --livereload

After that will launched simulator, in which infinitely spinning load indicator.
2016-04-16 0 15 10

But just emulate without livereloading work well:

$ ionic emulate ios

Run ionic info from terminal/cmd prompt: (paste output below)

Your system information:

Cordova CLI: 6.1.1
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Version: 1.2.4
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v5.7.1
Xcode version: Xcode 7.3 Build version 7D175

_Copied from original issue: driftyco/ionic#6184_

Most helpful comment

For iOS, I've succeeded adding this line to config.xml:

<allow-navigation href="http://localhost:8100/*"/>

I found the answer at #605

I think #826 is related

All 8 comments

_From @jacobdr on April 17, 2016 18:12_

I have seen a similar issue, but with ionc@beta and using Typescript, when running ionic emulate ios -s -c -l.

Your system information:

Cordova CLI: 6.1.1
Gulp version:  CLI version 3.9.0
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.4
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v5.10.1
Xcode version: Xcode 7.3 Build version 7D175

I chalked it up to the fact that fancy things like livereload are want to break at the bleeding edge. However, curious to see if maybe it is an OS X config issue and might be able to get my issue fixed as well.

_From @jacobdr on April 17, 2016 22:10_

Also worth noting that I am seeing the same behavior on live-reload when using ion run ios

Hello! Thanks for opening an issue with us! So since this issue is related to the ionic cli and not the framework i will be moving this issue over to that repo. Thanks again!

+1

Is there any workaround for this problem?

A possible workaround: (I tested it for Android)

The trick is to share internet connection from my device (connected to the wifi) to my PC through USB.

It is able to find the address and livereload works as expected.
It works well for me at least until this problem gets fixed.

Your system information:

Cordova CLI: 6.1.1
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.6
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
OS: Windows 8.1
Node Version: v4.1.0

For iOS, I've succeeded adding this line to config.xml:

<allow-navigation href="http://localhost:8100/*"/>

I found the answer at #605

I think #826 is related

+1 for @jordipuig his solution worked for me, just had to add --address localhost to the ionic emulate ios -l command

Was this page helpful?
0 / 5 - 0 ratings