Bug 198673 - Need to way to feature-detect for "Add to home screen" instructions
Summary: Need to way to feature-detect for "Add to home screen" instructions
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2019-06-07 11:45 PDT by Simon Fraser (smfr)
Modified: 2022-02-21 10:27 PST (History)
13 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2019-06-07 11:45:56 PDT
Pages need a way to feature-detect iOS vs desktop in order to tailor their display of "Add to home screen" instructions, since this only applies to iOS. It's no longer possible to use the user agent string for this on iPad.
Comment 1 Radar WebKit Bug Importer 2019-06-07 11:46:16 PDT
Comment 2 Maximiliano Firtman 2019-06-07 12:06:13 PDT
Many apps add manual instructions to users to how to Add to the Homescreen (aka Install) web apps. This is more important on apps using a Web App Manifest with display: standalone (formerly apple-mobile-web-app-capable meta tag) as there is no badge, indication, banner or way for the user to know the web app can be installed as . a standalone home screen webapp. Examples of these instructions webapps are rendering are:

These apps are now using user agent sniffing to know if it's an iPhone or iPad and show proper instructions. That won't be possible on Safari on iPad OS on desktop content mode. 

One solution to the problem is to implement the beforeinstallprompt event in the Web App Manifest spec (https://www.w3.org/TR/appmanifest/#installation-events) to trigger the Share Sheet > Add to homescreen dialog that will remove the need for these instructions.
Comment 3 Brent Fulgham 2022-02-12 21:13:58 PST
This is actually: