iOS 16 web push notifications in 2023

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

Small correction, all up to date Discourse instances have support for push notifications on MacOS Safari :wink:

3 Likes

In what way is this new? I thought MacOS Safari always supported notifications? The limitation has always been an iOS one?

MacOS Safari supported notifications, yes, but they were simply triggered by the page javascript. In Discourse, this meant that you would need a tab open for the website, for MessageBus to be still polling, the tab to not be suspended, etc.

Now, Safari on MacOS supports the WebPush standard where even without having Safari open at all you will still get notifications, very much like they work on native apps in your phone.

4 Likes

Ah got it, so they’ve now standardised. That’s excellent! Thanks for the explanation.

1 Like

Pushing Season 2 GIF by The Office

They made it restricted to apps added to the home screen! I suggested this to the Chrome team back in 2021 as a way to curb request spam, but they dismissed it.

13 Likes


[1] pry(main)> PushSubscription.last
=> #<PushSubscription:0x00007fec11b781a8
 id: 5164,
 user_id: 8722,
 data:
  "{\"endpoint\":\"https://web.push.apple.com/.........\",\"keys\":{\"p256dh\":\"..................\",\"auth\":\"..............\"}}",
 created_at: Thu, 16 Feb 2023 21:51:24.260325000 UTC +00:00,
 updated_at: Thu, 16 Feb 2023 21:51:24.260325000 UTC +00:00,
 error_count: 0,
 first_error_at: nil>

Just enabled it here on Meta on my iPad, let’s see how it goes.

First iOS push notification prize goes to @maiki

Looooots of notifications

16 Likes

We may have less testers this time around, at least initially:

If you install 16.4 using the profile then you will be stuck at b1 unless you log in with a developer account or until swap to the public betas.

Any ideas on what might keep these from working? I have them working here on Meta, but on most of my self-hosted instances and on https://forums.NaNoWriMo.org (an enterprise hosting customer I’m a moderator on) they’re not working.

The one thing the instances I can’t get it working on have in common is this is missing in the notifications preferences:

I did verify that my self-hosted instances have the same notifications settings enabled as the ones that are working so I’m at a loss because I’d really like to test this on mor forums, especially the NaNo forums.

1 Like

We had a manual block of Push Notifications in iOS that I just removed in the day Apple announced the first developer beta with support for push, 5 days ago.

Self-hosted sites need to update and for our hosting it will be rolled out in the normal cadence, aka in the next few days.

4 Likes

Hmmm, this is really odd then. All my self-hosted instances were updated yesterday. Unless a security update requires it sooner I always update on the 20th. I’ll try rebuilding a couple of them again and see what happens. :slight_smile:

4 Likes

Full steps are:

  1. Update for commit FEATURE: Use feature detection for showing push notification in iOS (… · discourse/discourse@8a224bf · GitHub

  2. Update to latest iOS developer beta 16.4

  3. Enable Web Push and Notifications on iOS Safari advanced settings

  4. Add the Discourse instance app to your home screen

  5. Launch from the newly create home screen shortcut

  6. Log in, since those don’t share cookies with Safari

  7. Enable notifications in consent banner or in the user profile > Notification preference page

11 Likes

Not sure what went wrong, but the two I just rebuilt are now working. :slight_smile:

4 Likes

There’s now a Public Beta.

5 Likes

Not 100% accurate. I had the public beta profile downloaded, and I switched over to the dev beta for free.

And anyone with the previous developer profile could upgrade to 16.4b1, it looks like subsequent upgrades will require developer access. That’s not my words, the language above comes from Apple.

Hence:

1 Like

Any guesstimates on when they’ll release iOS 16.4 as a non-beta?