Bug 193959

Summary: Feature Request: Add support for the `BeforeInstallPromptEvent`
Product: WebKit Reporter: Thomas Steiner <tomac>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: 709922234, ahsanejaz26, alvin, arthur.taylor, arup42, cedric, chi187, cristian.stanescu, d.arnolds, dulyr, fchabloz, gilbertoc, guilhermezz, harit.subscriptions, henry, info, jespertheend, jianbo.wu, jordan.michael.last, judahgabriel, juraj.malecka, lee, lucasschiochet, mail, marcosc, mark, martiminchev, m.goleb+bugzilla, mitz, mjs, mrtopf, mubatt, n.dj, nick, nicolas, palomera.mario, paul.neave, pp33pp22, qmcgilvery12, rniwa, romulocintra, sander, sjricc, splaktar, talk, tranct
Priority: P2    
Version: Safari 12   
Hardware: iPhone / iPad   
OS: iOS 12   

Description Thomas Steiner 2019-01-28 23:58:24 PST
The `BeforeInstallPromptEvent` is fired at the `Window.onbeforeinstallprompt` handler before a user is prompted to "install" a web site to a home screen on mobile. It is specified in https://w3c.github.io/manifest/#beforeinstallpromptevent-interface.

Having a _controllable_ and _predictable_ install prompt on both iOS and Android is one of the top-requested features by many of Google's partners.
Comment 1 Harit Himanshu 2019-01-30 14:05:35 PST
Please prioritize this issue. Getting PWA consistently across all devices is very important to us as web developers. Thank you
Comment 2 Maciej Stachowiak 2019-01-30 23:03:01 PST
We don't have an install prompt in Safari, either automatic or site-initiated. Unless that changes, supporting the event in WebKit wouldn't do anything because it would never fire.
Comment 3 Henry 2019-01-31 18:04:32 PST
(In reply to Maciej Stachowiak from comment #2)
> We don't have an install prompt in Safari, either automatic or
> site-initiated. Unless that changes, supporting the event in WebKit wouldn't
> do anything because it would never fire.

I think it's safe to assume that Thomas is requesting the creation of an Install Prompt (that also comes with support for the BeforeInstallPromptEvent). That is certainly what I want.

The current process of adding a PWA to the homescreen on iOS is very unintuitive. It's so unintuitive that users currently have to be guided through the process with popups and diagrams. Currently, a site might need to do something like this....  

site: "Would you like to install this app?"
user: "Sure, how do I do that?"
site: "OK, well I'm going to assume you're in Safari and not some 3rd party browser. Start by clicking on the Share button at the bottom of the screen."
user: "I can't see a Share button"
site: "It's probably hidden. Scroll back up a little bit to reveal the buttons, then click the Share button."
user: "OK, got it"
site: "Now click the 'Add to homescreen' button"
user: "I can't see that button"
site: "OK, you might have to scroll horizontally on the bottom row of icons to find it"
user: "OK, found it"
site: "Great, now just click 'Add' in the top right hand corner, and you're done"
user: "Done. You're lucky I love your app because that was really annoying."


I think users (and developers) would appreciate a more streamlined install process. An install prompt that could add to homescreen with a single click would remove a lot of the pain described above. It would also remove a lot of confusion that can occur if a site shows the above install instructions when the user is not actually in Safari, but is in a different iOS browser.
Comment 4 Judah Gabriel Himango 2019-02-01 09:42:14 PST
We use this feature on Chrome and Android to let the user install our PWA, Chavah Messianic Radio.

It works great!...on Android.

Sadly, there is no support for this on iOS, leaving our iOS users as 2nd class citizens.

Making it easy for users to install my app on iOS is key to first-class PWA support. Apple needs not lag behind Google here, but should be leading the way to make iOS the best platform for mobile for users.
Comment 5 Lucas Forschler 2019-02-06 09:18:31 PST
Mass move bugs into the DOM component.
Comment 6 Jesper van den Ende 2019-03-11 13:22:06 PDT
I would love to have install banner support in WebKit on iOS. You can use https://tix.tax as a test case for this. It already works in Chrome on android and on Chrome desktop in the Canary channel or with the chrome://flags/#enable-desktop-pwas flag enabled.
I should add that the install button appears in the main menu after closing the main menu and opening it back up again.
Comment 7 Romulo Cintra 2019-03-11 15:05:14 PDT
Would be fantastic provide similar behaviour prompt to install to users in a similar way we have in Chrome. This means that more savings in storage, more opportunities for developers and better experience for users
Comment 8 Nathaniel Dassardo-Joseph 2019-03-12 03:38:37 PDT
Probably the most wanted feature for PWAs on iOS.

Will increase conversions significantly and make PWAs on iOS a truly viable option
Comment 9 Lee wilkins 2019-03-27 23:52:56 PDT
Really need this feature on iOS. Would take PWAs to the mainstream.
Comment 10 Christian Scholz 2019-03-29 13:07:55 PDT
+1 to this. Having no install prompt for PWAs on iOS makes it very complicated for users.
Comment 11 Francois 2019-04-02 01:42:59 PDT
+1 here too. Thanks for hearing us :)
Comment 12 qmcgilvery12 2019-04-02 22:37:08 PDT
+1 This would be a great help in making PWA's a viable option
Comment 13 Arthur Taylor 2019-04-09 07:30:32 PDT
+1 Would really love to see this ASAP on iOS devices so that we can create truly platform-independent web applications with excellent user experience
Comment 14 Philipp 2019-04-09 14:01:28 PDT
+1 Would be great to have this
Comment 15 Ernst 2019-04-15 01:43:21 PDT
+1 It will be fantastic to have this.
Comment 16 Pixelstyle 2019-04-29 00:11:47 PDT
+1 It would be great to have this feature!
Comment 17 Bas 2019-04-29 00:12:37 PDT
+1 It would be great to have this!
Comment 18 pp33pp22 2019-05-02 05:31:54 PDT
+1 It would be great to have this!
Comment 19 Nick Stemerdink 2019-05-02 12:06:33 PDT
comment #3 sums it up real well. The current process is way too cumbersome.

As a workaround we show a dialog on iOS with step by step instructions including a help-video to show users where to click. Even though this helps and gets some more users to install the PWA, it is not a good user experience. Users just want to click once (okay maybe twice), install and use the app, that's it.

I think this is one of the last big issues blocking PWA's from really taking off.
Comment 20 Ahsan Ejaz 2019-05-11 09:22:35 PDT
+1 Apple bros, I need this. Pls add. You don't need to lag behind Chrome.
Comment 21 Mario Palomera 2019-05-15 12:52:37 PDT
Please add an install prompt in Safari. May web apps will greatly benefit from this.
Comment 22 jordan.michael.last 2019-05-28 10:50:14 PDT
I am urgently in need of this feature as well as push notifications. Can't wait!
Comment 23 Steve 2019-06-04 05:29:50 PDT
+1 This is a much needed feature in Safari.
Comment 24 Matt 2019-06-08 07:54:05 PDT
+1 We desperately need this feature.
Comment 25 Lucas Schiochet 2019-06-15 13:52:25 PDT
+1
So lame that google chrome has this for almost three years and you guys are focus in change the iphone color.

If i change this comment to spacial dark silver can you guys finally be able to deliver it?
Comment 26 Mark Harrell 2019-07-22 10:56:00 PDT
Without an install prompt in Safari, I'm afraid any PWA support from Apple is superficial at best. The install prompt, probably even more so than push, will catapult  PWA adoption.
Comment 27 Thien Tran 2019-07-30 20:08:03 PDT
+ 1 This is a feature that we definitely need for the iOS PWA
Comment 28 dulyr 2019-08-24 19:22:09 PDT
Can't believe this is still not implemented. We are telling all our ios safari customers that "they will have a worse experience than almost all other customers because years old features are not implemented on ios because it is outdated" we are warning clients that ios is an unsupported and outdated platform. Would love to no longer have to tell people this.
Comment 29 jianbo.wu 2019-11-07 02:05:14 PST
+1 It would be great to have this!
Comment 30 Ryosuke Niwa 2019-12-06 18:32:43 PST
Adding a prompt has an obvious drawback that an ordinary user can't tell what "installing" a website even means. If we're trying to gate any feature only to installed apps, then it goes directly against the goal of differentiating websites that the user trusts; by the virtue of eagerly asking the user to install an app, we've decreased the likelihood that the user intentionally did so.
Comment 31 Ryosuke Niwa 2019-12-09 13:39:10 PST
We're not going to support this feature for the above reason. Posted this feedback: https://github.com/w3c/manifest/issues/835
Comment 32 Christian Scholz 2019-12-09 14:17:48 PST
So call it "add website to homescreen" or explain, what it means? 

Why make it so hard to use PWAs?
Comment 33 Ryosuke Niwa 2019-12-09 16:25:54 PST
(In reply to Christian Scholz from comment #32)
> So call it "add website to homescreen" or explain, what it means? 

The issue isn't that the user won't understand "installing" means saving to "home screen". The label or description doesn't matter much.

The issue is that if website is asking the user to save it on home screen, that is less of a signal to the web browser / operating system that the user had intentionally done so because some user may just tap through prompts from habit / muscle memory.

If the user were to manually add it to home screen via Safari's UI, then that's more of a positive signal that the user wanted to do that, and we already have such an UI in Safari's share sheet although that's outside the scope of the WebKit project since we don't control Safari or any other browser's UI.
Comment 34 Henry 2019-12-10 04:21:11 PST
(In reply to Ryosuke Niwa from comment #33)

> The issue is that if website is asking the user to save it on home screen,
> that is less of a signal to the web browser / operating system that the user
> had intentionally done so because some user may just tap through prompts
> from habit / muscle memory.

My understanding is that Chrome implements a number of technical hurdles and engagement heuristics before a web app is allowed to display the install prompt. I assume the smart people at WebKit could do the same to ensure only quality apps that users actually use would be able to display the prompt.

> If the user were to manually add it to home screen via Safari's UI, then
> that's more of a positive signal that the user wanted to do that, and we
> already have such an UI in Safari's share sheet although that's outside the
> scope of the WebKit project since we don't control Safari or any other
> browser's UI.

I think the problem is really Safari's UI. The 'Add to Homescreen' action is so hard to find and so obscure for users, that no one would ever find it. Why on earth is it part of the Share sheet??    

I really like the Ambient Badging Install prompt that Chrome, Samsung and Edge have implemented. I think ambient badging solves the 'positive signal' concern that the WebKit team seem to have, and also solves the main problem that developers have - that there is no obvious or easy way to install a web app on iOS. 

(On a side note... it's interesting that everyone commenting in this thread is talking about 'web apps' and 'pwas', but the response from the webkit team talks about installing a 'website'. It's almost like web apps don't exist.)
Comment 35 Thomas Steiner 2019-12-10 07:09:53 PST
Left a comment on https://github.com/w3c/manifest/issues/835#issuecomment-564076432. FYI for the people watching this from here: there is additional discussion going on over on the GitHub thread.
Comment 36 Ryosuke Niwa 2019-12-16 14:47:17 PST
For folks following this bug, please go read the discussion on https://github.com/w3c/manifest/issues/835 and https://github.com/w3c/manifest/pull/836 before leaving a new comment here.
Comment 37 Ryosuke Niwa 2020-02-04 00:55:54 PST
*** Bug 207171 has been marked as a duplicate of this bug. ***
Comment 38 Thomas Steiner 2023-04-21 02:56:01 PDT
*** Bug 255716 has been marked as a duplicate of this bug. ***