iOS 16 web push notifications in 2023

I think maybe there was something wrong with my notifications settings on my iPhone where they weren’t arriving:

Ah nice! So people could still get the notifications without A2HS, sounds great, thank you.

I was under the impression that iOS notifications in Discourse Hub only worked for Discourse instances hosted by the Discourse team as per the message below. Has this changed?

4 Likes

As the thread you linked to explains, Discourse Hub can push notifications for any Discourse site, even ones not hosted by the Discourse team, but it only pushes live (instant) notifications for sites hosted by the Discourse team. If you add a non-hosted site to Discourse Hub, you’ll get notifications, but at a slower schedule.

Nonetheless, I don’t think that’s what the question is asking about, but I may have misunderstood:

Discourse Hub can already send iOS push notifications to from all of the Discourse instances within it. Non-hosted sites send notifications more slowly, but they do send notifications.

3 Likes

Ahh I was indeed hoping that self-hosted sites would send be able to send immediate notifications. Maybe the delay in the notifications was what confused me about whether they were currently being sent or not.

That being said, I’m excited that iOS 16 should enable the immediate ones for self-hosted Discourse sites :tada:

1 Like

Thanks for the clarification. I am mainly interested in live iOS push notifications, not notifications fetched via polling.

1 Like

“WKWebView” is Apple’s API for embedding a web browser in a native app; Discourse Hub uses WKWebView. As far as I know, today’s existing proprietary macOS Safari 15 push notifications don’t work in a WKWebView on macOS.

Apple makes some native-like features available only in the Safari app, not in a WKWebView, and sometimes not even in web pages saved to the home screen, which technically each run in a separate “Web.app” process on iOS.

We don’t yet know whether the new standard Push API will work in a WKWebView, (so we don’t know whether they’ll work in Discourse Hub), and we certainly don’t know whether Push API will work in a WKWebView on iOS, which isn’t even shipping in 2022.

But, a few more details are supposed to be available at tomorrow’s presentation.

FWIW, it’s typical for Apple Evangelists to refuse to answer further questions about native-like features on the web publicly.

Consider this question posed on Twitter:

Apple has been answering Maximiliano’s questions throughout the day, but, uh, for some reason, just this question has gone unanswered! :grimacing:

5 Likes

Oh goodness, I love this level of detail, thank you for writing it out. Here’s to hoping it will work on the WKWebView in iOS and homescreen apps :crossed_fingers:t2:

I’m glad to see that I wasn’t the only one watching that keynote. :wink:

I’m not sure why it won’t debut with the first release of iOS 16, but whatever…

Wasn’t that already available in macOS? I’ve been able to receive able to receive Safari push notifications from MacRumors for years now. Maybe they were using a workaround of some sort? :thinking:

2 Likes

As I said in my earlier post:

1 Like

Ah, sorry. I wasn’t entirely sure what you meant by that. :see_no_evil:

1 Like

There was very little detail in today’s video. Meet Web Push for Safari - WWDC22 - Videos - Apple Developer

WebKit has a blog post up today.

There’s a little more detail available here.
https://developer.apple.com/documentation/usernotifications/sending_web_push_notifications_in_safari_and_other_browsers

At the Safari WWDC lounge, a user “John” asked a question, “Will web push work in WKWebView instances?” The answer from “Brady E” at Apple was:

On macOS Ventura, Web Push is only supported in Safari 16.

John followed up: “what about iOS/iPadOS?” to which Brady replied, “Look for iOS/iPadOS support in 2023.” So, they’re not answering any questions today about iOS support.

It seems extremely unlikely to me that Web Push notifications will work in a WKWebView in 2023, especially on iOS, so I expect that Safari Web Push will have no direct benefit to Discourse Hub.

But, of course, the Discourse Hub app will be much less important when Safari Web Push lands.

6 Likes

Thank you for following this with Apple and for writing a follow-up to this here :pray:t2:

There are some other benefits to the Discourse Hub application.

You’re mostly correct though. It’ll become partially obsolete soon enough. I wonder if CDCK will ditch it altogether… :thinking:

1 Like

Its About Time GIFs | Tenor

BTW, There are no plans on ditching the mobile app, it’s still very useful to be able to aggregate all of your discourse sites and notifications together in one place, separately from receiving real-time notifications

3 Likes

Would it make sense to bring Discourse Hub to the web as a PWA?

4 Likes

That’s unfortunately not something currently on our roadmap, but it’s something I personally would love to see, it’s an great idea :slight_smile:

7 Likes

Me too. Especially since non-push notifications flat out don’t work 95% of the time.

Really this whole topic is about push notifications, which you simply can’t get on iOS with self-hosted Discourse without creating a separate iOS app, which then might not be accepted into the App Store.

3 Likes

Oh, I’m glad to hear it’s not on the chopping block! @jimkleiber made a good point about that.

1 Like

Nodeb solved this problem with ntfy

meta.discourse.org now supports macOS Safari pushes. (Hopefully Apple will enable iOS web pushes soon.)

3 Likes