As of now I can get pwa by hosting the whole things to firebase. But I want the same pwa without hosting. Is it possible to get pwa app from localhost? How to get add to shortcut when I am running app from localhost. I tried same from firefox in pc and I get that. but dont know how to get same in mobile.
So when you run 'ionic serve' command on a PC - you access your PWA on that PC using localhost name. Now your PC also has local network address (granted by your local router like wifi router etc). You need to learn that address for your computer that runs ionic serve (typically it will be like this one: 192.168.etc.etc) and you then use your mobile browser (safari or android) from a mobile device connected to the same router to go to that address and use the port that is used by Ionic (8100 by default).
So if your local PC address which you run ionic serve on is 192.168.0.13 and you did not configure non default port you need to navigate to:
192.168.0.13:8100
This will open your web-app, then you can "add to homescreen" etc to work with it as PWA.
Please note that PWA related capabilities have restrictions (like requires to work with https etc). Some of those restrictions are omitted for local addresses (like local host, like classic 192.168.etc ranges used for local networks). So depending on your local area network setup you might need to ensure configuration (via wifi admin) and ip address distribution is not causing any concerns.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With