Testing your local environment against Xcode and Browserstack is great but at the end of the day they are still just emulators. If you need to test against an actual mobile device it is useful to load your current local environment on a mobile device and do your testing immediately before you push to a remote server.
The following instructions are pretty specific since most Front End dev where I work is done on a Mac but I imagine that the instructions would be similar for a Windows machine.
For the record there are third party plugins that you can do this with as well, but if you do not already have those installed as part of your workflow that should not stop you.
Mac to iPhone:
- Verify that your server is running locally, for example, http://localhost:3000
- Connect to the same network on both devices.
- Find your computers name by either looking in your sharing settings or opening up your terminal. Ex:
acarlson-mac
- In a browser app on your phone go to
{{your-computer-name}}.local:{{port}}
Mac to Android:
- Verify that your server is running locally, for example, http://localhost:3000
- Connect to the same network on both devices.
- Find your computers internal IP address by either looking in your sharing settings or using
ifconfig
in your terminal. - In a browser app on your phone go to
{{your-internal-ip}}:{{port}}