g105b / pwa

Example of how to turn a PHP website into a Progressive Web App.
https://pwa.g105b.com
88 stars 41 forks source link

Install button is not showing on localhost #4

Closed Muhammad235 closed 1 year ago

g105b commented 1 year ago

Hello @Muhammad235 , I'm happy to help you - what is the issue you're facing?

Can you kindly explain your expectations, what you've tried, and what actually happened when you tried?

Muhammad235 commented 1 year ago

I cloned the repo and I test run it on my localhost the install button wasn't installing the site locally, or do I need to deploy it on a hosting server and test it on mobile phones before it can work?

g105b commented 1 year ago

The install button only appears if being hosted using TLS. To run it locally, you will need to have a self-signed certificate. This will be shown as an error in the developer console.

I've changed the issue title in case anyone else searches for the same question, and I will add this information to the readme soon.

Muhammad235 commented 1 year ago

Ok good, I hosted it on a free platform for testing https://pwa-testt.000webhostapp.com But can't still install it, the main functionality I wish to see is to install it and make it work like a native app, don't need it to work offline

g105b commented 1 year ago

What browser are you using? How are you asserting that the install button is not showing?

In case you are not aware, the code is hosted at https://pwa.g105b.com and once the PWA is enabled, the installation prompt will appear on browsers that support it.