Previewing your local webserver on mobile emulators
For iOS, (assuming XCode is installed): Run the following from the Terminal:
ln -s /Applications/Xcode.app/Contents/Applications/iPhone\ Simulator.app /Applications/iOS\ Simulator.app
via my dotfiles
Then, you can navigate to http://localhost:XXXX as usual.
For an Android emulator, simply open your browser and navigate to 10.0.2.2. which is a way of telling the emulator "not your localhost, the machine the emulator is running on, that localhost".
Written by Kevin Suttle
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ios
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#