Would it make sense to bring Discourse Hub to the web as a PWA?
That’s unfortunately not something currently on our roadmap, but it’s something I personally would love to see, it’s an great idea
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.
Oh, I’m glad to hear it’s not on the chopping block! @jimkleiber made a good point about that.
meta.discourse.org now supports macOS Safari pushes. (Hopefully Apple will enable iOS web pushes soon.)
Small correction, all up to date Discourse instances have support for push notifications on MacOS Safari
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.
Ah got it, so they’ve now standardised. That’s excellent! Thanks for the explanation.
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.
[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
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.
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.
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.
Full steps are:
-
Update for commit FEATURE: Use feature detection for showing push notification in iOS (… · discourse/discourse@8a224bf · GitHub
-
Update to latest iOS developer beta 16.4
-
Enable Web Push and Notifications on iOS Safari advanced settings
-
Add the Discourse instance app to your home screen
-
Launch from the newly create home screen shortcut
-
Log in, since those don’t share cookies with Safari
-
Enable notifications in consent banner or in the user profile > Notification preference page
Not sure what went wrong, but the two I just rebuilt are now working.
There’s now a Public Beta.
Not 100% accurate. I had the public beta profile downloaded, and I switched over to the dev beta for free.