As I spoke about the future of App development in one of my posts, I briefly touched PWA aka Hybrid applications and why you should learn it.
Now maybe you started learning how to develop PWA using Ionic but when you ran ionic serve in the terminal the app started in a browser tab. But you are developing it for smartphone users, right?
Hey, don't worry I'll explain how you can run it on an actual device WHILE developing it.
Let's go...
Step 1: Google it
Just kidding.
- Connect your android device to your computer/laptop with a USB cable and turn on usb tethering
- Open the terminal and run
ipconfig
- Note your tethering hotspot IP address like the one in the below figure
- Run ionic server to start the app
ionic serve
- You can access the app through any phone browser at
IP_ADDRESS:8100
Now you can test your app on your device while developing it. Any change you make to the app will be reflected in your device instantly.
Why you should?
Well, imagine your PWA has a QR code scanner. How will you test its functionality without loading it onto an actual device? This is one of the reasons I prefer testing PWAs directly on the device instead of a simulated browser instance.
That's all for today guys.
I'll see you in the next one.
Cheers,
Jha
Top comments (0)