“Add to Home Screen“ (A2HS) has been a feature of iOS since the original launch of iPhone. But it’s never been very clear to users how to do it (or why anyone should).
Coming soon in iOS 16.4, iOS will support push notifications, but not for just any web site. It only works when you’ve “installed” the web app as an “app” via A2HS.
So! I think it would make sense for Discourse to explain to users how to A2HS and then sign up for push.
In iOS 16.4, to sign up for push, you have to:
Scroll to reveal the URL bar
Tap the (unlabeled) Share button (the box with an up arrow)
Scroll the Share Sheet to reveal the A2HS button (and it’s not at all obvious that the sheet is scrollable!)
Tap on “Add to Home Screen”
Tap the “Add” button in the upper right corner (preferably without renaming the app)
Return to your Home Screen, find the new app icon you just made, (which may be on a secondary Home Screen, so you might have to search for it by name, e.g. “Meta”) and tap on it
Sign in again. (The A2HS PWA doesn’t share cookies with Safari, so if you sign in with Facebook, you also have to login with Facebook from scratch, including two-factor authentication and “Trust This Browser”.)
Tap the banner to sign up for push
This will be extremely difficult for users to figure out!
Discourse should provide a link explaining how to A2HS and sign up for Push, preferably including a video tutorial showing how to do this, step by step.
Worse, I think it can’t just be one video tutorial. Much depends on whether you’re doing it on iPhone or iPad, whether your device has a Home button or not, etc.
Still, I think a feature like this would really help a lot for onboarding users to push notifications.
Yes, and we already have a method for this in sniff-caps
There is already a banner in Android that trigger for TL1+
Clicking no is persisted to local storage.
Main issue here is that Apple was brought here against it’s will, so clicking on the install won’t trigger a install, but all we can do is show a modal with a tutorial of how it works. There is no community consensus around the modal appearance.
That’s a common misconception. The “Push API” feature flag does nothing in 16.4. Push API works out of the box, enabled by default on iOS 16.4 (but only once you A2HS).
(I speculate that feature flag maybe will one day enable Web Push directly in Safari, without A2HS, but that feature doesn’t exist today, so turning the flag on/off does nothing.)
Go on and try it! You’ll receive a push, even with the flag disabled.
Don’t forget to follow all the steps I documented above. Tap on the A2HS PWA, sign in there, and then Enable Notifications via the banner. You should receive a test push right away.
As we already ascertained in the other topic that setting doesn’t refer to Web Push and has in fact been kicking around under experimental settings since iOS 15.4.
After the PWA has been added users only need to log back in and then enable notifications from their profile within the PWA.
One area of push back I have here is that the Discourse Hub app is still a tiny bit superior to the PWA
Multiple sites in one
Push notifications for all our hosted customers
No need to log in a second time due to auth handover protocol
Share link in footer instead of just back/forward
Easier to install (arguably)
That said … this is great progress, for sure! It is super usable
This kind of solidifies that the experiment with the loud nagging and teaching should be in a theme component (with an optional mode for teach about hub vs teach about pwa). Also makes me wonder if we can teach Hub just to lean on web push notifications as well for self hosted…
IMO, the only advantage that Discourse Hub has right now is that it’s easier to (learn how to) install. Discourse Hub is an app, and everybody knows how to install an app. In Hub, you’d then have to paste in the forum URL, but there’s UI holding your hand through the process. Whereas the iOS A2HS process is… non discoverable. (Hence this thread!)
“Multiple sites in one” is actually a drawback for my tastes. (But, if you’re interested in it, it is now possible to rewrite Discourse Hub as a PWA! )
“Push notifications for all our hosted customers” applies equally to Web Push, right? And even non-hosted customers get instant push with iOS 16.4 Web Push, whereas when I’d add non-hosted forums to iOS Discourse Hub, it would have to poll my non-hosted forums periodically, introducing delays.
“No need to log in a second time” … I just use “Sign in with Apple” and I’d say the experience is equally good for A2HS Web Push as it was in the Discourse Hub. I click Login, Apple scans my face, and I’m in.
“Share link in footer” I’m sure I’ve never used that!
Yeah sort of, we would lose a bit of chrome, the “collapse” to everything view (downwards triangle) would have to be implemented elsewhere. I don’t think you have control over buttons in the footer?
Also that is a can of worms cause we would would need to vet which sites we allow on the “web hub” and which are not allowed which will introduce regular work given there are upwards of 37k sites out there.
Yes… ideally Apple give us APIs just to lean on web push from apps so we no longer depend on being an arbitrar of notifications.
We are actually partially blocked here till we amend some internal auth stuff. If you have 2fa enabled you can not use 3rd party auth. We don’t allow both and internally we have a policy that all accounts of staff have 2fa on both dev and meta. We will change this… but not this week.
We released an official theme component today that will be shown to iOS users on iPhone or iPad, encouraging them to install the Forum to their home screen as a PWA.
I’ve continued the conversation on the theme component’s thread. I agree that it seems wiser for the default text to mention that A2HS is required for push notifications.