I tried to use live reload feature with ionic serve
and ionic emulate ios --livereload
. Server starts well, application is displayed on simulator (or in browser) and it works smoothly.
When I change a file (a js or html in www
directory) and save it, console write HTML changed: www/index.html
for example, but application doesn't reload itself as it should be.
I supposed that websocket between server and app could be broken, but when I kill the server (Ctrl-C), web inspector immediatly fire the following error :
[Error] WebSocket network error: The operation couldn’t be completed. Connection refused (192.168.5.2, line 0, x4)
So I supposed that there is no issue with websocket. Moreover, it is displayed with no error in Network pane of web inspector.
Is there something I missed to made livereload work ?
My configuration :
Don't hesitate to ask me for clarification if something is not clear.
Edit
I also tested it without Internet connection at all to check if it was a firewall issue or something like that, but it changes nothing.
Try running ionic address
and selecting the correct interface.
If it doesn't work and it's iOS 9, it may be an issue with Apple ATS:
https://github.com/driftyco/ionic-cli/issues/605
It could also be a CORS issue. In this case, try installing the cordova-white-list
plugin.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With