demo · v140

Desktop PWA promo gate

Chrome 140 extends navigator.getInstalledRelatedApps() to desktop PWA detection. Use it to suppress install promos for users who already installed your PWA. Pick a scenario and watch the promo logic flip.

User state:
getInstalledRelatedApps() returns
[]

Install the desktop app

Use Acme as a desktop app — fewer tabs, offline support, and faster launch.

scenariodesktop promomobile promo
nothing installedshowshow on mobile UAs
iOS app installedshowhide
Android app installedshowhide
desktop PWA installedhideshow on mobile UAs
// declare related apps in the page
<link rel="manifest" href="/manifest.webmanifest">
// manifest.webmanifest
{
  "related_applications": [
    { "platform": "play",   "id": "com.acme.app" },
    { "platform": "itunes", "url": "https://itunes.apple.com/app/id1234" },
    { "platform": "webapp", "url": "https://acme.example/manifest.webmanifest" }
  ],
  "prefer_related_applications": true
}

// query at runtime
const installed = await navigator.getInstalledRelatedApps();
const hasDesktopPwa = installed.some(a => a.platform === "webapp");
if (!hasDesktopPwa) showDesktopInstallPromo();

see also