Prompts

SharePush Web SDK — PWA Install Prompt

The 'install this app' prompt: why it matters (required for iOS push), per-platform targeting, manifest requirements, iOS guidance, and dismissal cooldown.

PWA Install Prompt

This prompt invites visitors to install your site as an app (add to Home Screen / install PWA). It matters for two reasons:

  1. On iOS it's mandatory — Safari only allows web push for sites the user has installed to the Home Screen. No install, no iOS push.
  2. On Android/desktop it improves reliability and re-engagement — an installed PWA gets a more stable push experience and an app icon.

#Enabling / disabling

It's on by default. Turn it off entirely with:

 1Sharepush.init({ pwaPromptEnabled: false });

#Requirements for it to appear

The install prompt is only shown when the SDK confirms the page has valid PWA assets — specifically a reachable Web App Manifest:

 1<link rel="manifest" href="/manifest.json">

with at least a name, start_url, and icons. If the manifest is missing or invalid, the prompt is skipped (and on mobile the SDK falls back to the push prompt instead).

It's also skipped when the app is already installed / running in standalone mode.

#Per-platform targeting

Use pwaPromptPlatforms to show the install prompt on some platforms but not others — handy for A/B testing or platform-specific strategy. Platform keys: ios, android, windows, mac, desktop (desktop = the catch-all for Linux/ChromeOS/other).

Object form — disable specific platforms, everything else stays on:

 1Sharepush.init({
 2  pwaPromptPlatforms: { ios: false }   // show install everywhere except iOS
 3});

Array form — strict allowlist, everything not listed is off:

 1Sharepush.init({
 2  pwaPromptPlatforms: ['android', 'mac', 'windows']  // only these three
 3});

Common aliases are accepted (pc → windows, osx/macos → mac, linux/chromeos → desktop, iphone/ipad → ios). Misspelled keys are ignored, so double-check spelling.

#iOS behavior

On iOS the SDK shows tailored guidance (pwaPromptIosMessage) explaining the Safari → Share → "Add to Home Screen" steps, because iOS has no one-tap install. On Android and desktop Chromium, a native one-tap install is used when the browser offers it.

#Timing & dismissal cooldown

  • Appears 4500 ms after load by default. Change with pwaPromptDelay or pwaPromptTrigger (delay or scroll-depth).
  • After a visitor dismisses it, it won't reappear for pwaPromptDismissDays days (default 7). After a successful install, a long cooldown is set so it isn't shown again.

#Customizing copy

 1Sharepush.init({
 2  pwaPromptTitle: 'Install Example.com',
 3  pwaPromptMessage: 'Add us to your Home Screen for instant alerts.',
 4  pwaPromptIosMessage: 'Tap Share, then "Add to Home Screen".',
 5  pwaPromptAllowText: 'Install',
 6  pwaPromptDenyText: 'Maybe later',
 7  pwaPromptDelay: 6000,
 8  pwaPromptDismissDays: 14
 9});

#Relationship to the push prompt

On mobile the install prompt is shown before the push prompt (the push prompt waits for the install decision). If the install prompt is ineligible, the push prompt is released as a fallback. See Push Notification Prompt.


Next: In-App Browser Bridge →