Ionic mobile browser testing is not working

andreaspfr picture andreaspfr · Apr 9, 2015 · Viewed 11.8k times · Source

I try to use mobile browser testing with ionic. I'm connected in the same Wifi as my iPhone and checked my IP-Address with the following command: ifconfig |grep inet. When I'm running ionic server with the command ionic serve I'm not able to open my ionic app on my iPhone using my IP-Address and the specified port from ionic. Do I have to enable something else on my machine? I also tried different ports without any success.

Answer

Federico Hernández picture Federico Hernández · May 6, 2015

This answer may be late, but I hope it is useful to anybody who has the same problem in the future. What solved this issue for me was to put the following command: ionic address and select the ip of my dev server(in my case 192.168.0.2) instead of the localhost option. Now when I run ionic serve I can succesfully connect from the mobile browser.