How to test your mobile app locally in multiple devices (IOS, Android)

You are developing a mobile app or a web app, you run it locally and you want to test in the mobile (android/ios) or other browser (like Safari) but for example you don’t have a Mac.. What to do?

You can use Amazon device farm to test in a real IOS mobile or you can use lambdatest.com to test in a safari browser

First you have to expose the local dev server to the web with a local tunnel, You can do this with a npm package (You need to have Node.js installed)

Steps

1- Install Npm LocalTunnel Package

npm install -g localtunnel

2- Open local webserver with in a port

Example for Angular or Ionic App in Port 8100

Angular:

ng serve --port 8100

Ionic:

ionic serve --port 8100

3- Open the tunnel executing

lt --port 8100

4- Grab the url they give you (in the console)

5- Open a web browser with that url

6- Now go to Amazon Device Farm

7- Create a device and open safari

You have also other alternatives like for example LambdaTest https://app.lambdatest.com/ , you have 6 sessions free per day.


Profile picture


Hi, I'm Leandro Merli and this is my blog where I write about Angular, AWS, Node.JS, Serverless, Wordpress and now I'm testing and using Gatsby as SSG (static site generator), the framework I used to build this blog. :) Please follow me on medium.com or contact me in linkedin