The Love2Dev Custom Add to Homescreen Prompt Manager. You can control how visitors are prompted to add your Progressive Web App to their device, including iPhone and iPad.

There are some basic criteria a page must meet in order to qualify to trigger a prompt. There must at least be a reference to a web manifest file and a registered service worker. From there you can configure the library to follow your own ruleset.

There are several example test pages available to demonstrate how the library can be used. There are several custom properties and settings you can use to control how the native and non-native prompts are triggered.

Chrome and the Chromium based Edge support a native prompt for both Android and desktops. If available this is the default choice. The library catches the beforeinstall event to reference the event object and display the native prompt according to the custom ruleset.

Classic Edge does not have an Add to Desktop feature, so no prompt should display. This will be the general rule in any browser that does not have some sort of homescreen support, like desktop FireFox.




General Sample

A set of properties and values passed to the library to demonstrate its flexibility.

Try it Out
Custom Trigger

Trigger the prompt mannually by calling the trigger method.

Try it Out
Custom Criteria

Sets the customCriteria property to demonstrate how you can control if a prompt can be displayed using a custom function or simply passing true or false.

Try it Out
iPhone

Using the debug property to mannually set the platform (browser) to iPhone. Note: Safari is the only iOS browser supported by Apple restrictions. So psuedo browsers like Chrome, Edge & FireFox are excluded.

Try it Out
iPad

Using the debug property to mannually set the platform (browser) to iPad. Note: Safari is the only iOS browser supported by Apple restrictions. So psuedo browsers like Chrome, Edge & FireFox are excluded.

Try it Out
FireFox

Using the debug property to mannually set the platform (browser) to FireFox. Note: FireFox only supports Add to Homescreen on Android.

Try it Out
Opera

Using the debug property to mannually set the platform (browser) to FireFox. Note: Opera only supports Add to Homescreen on Android.

Try it Out
Samsung

Using the debug property to mannually set the platform (browser) to FireFox. Note: Samsung only supports Add to Homescreen on Android.

Try it Out
Inline

Display an inline promotion.

Try it Out