PWA: How to programmatically trigger : “Add to homescreen”? on iOS Safari

前端 未结 2 1518
挽巷
挽巷 2020-12-12 22:33

I released a server rendered progressive web app recently and everything works great so far. However, Android using chrome shows a banner to download the app which is awesom

2条回答
  •  无人及你
    2020-12-12 23:28

    iOS - Safari currently don't support Web app install banner, like in Android - Chrome.

    There is no way to programatically trigger install banner in Android as well, except for the case when you catch the beforeInstallPromot and use that to show the banner.

    In the linked answer, you can check on the alternate option on how to show in app banner to guide user to add to home screen. Here is some code example for the same, which is iOS specific(look under #PROTIP 3).

提交回复
热议问题