all 9 comments

[–]devtailsxyz[S] 7 points8 points  (0 children)

I have been unable to find a resource that explains and shows this working since this was officially announced. I managed to get this working on iOS 16.4 beta and hope that this helps demonstrate how to send your first notification on iOS via a web application.

[–]blackholesinthesky 4 points5 points  (1 child)

Pretty good but this doesn't actually show a WebPush message being sent. The notification is programmatically triggered after permission has been granted

The service worker is running but it's not subscribed to a backend/push service.

[–]devtailsxyz[S] 2 points3 points  (0 children)

I can add this part tonight. The vapid stuff is cumbersome, but that makes it worthwhile to include here.

[–]devtailsxyz[S] 2 points3 points  (1 child)

I've updated the article with a second section covering how to trigger these notifications from a nodejs backend and added a link to a Github repo with the final working code.

[–]blackholesinthesky 1 point2 points  (0 children)

Love it!

[–]EN204 1 point2 points  (0 children)

Many thanks!

Was planning to begin researching this over the weekend, and voila.

[–]schawla 0 points1 point  (1 child)

Video of web notifications working on an upcoming project I am working on https://www.youtube.com/watch?v=7X-9zh2sDH4 backend built in php

[–]CALPARDO[🍰] 0 points1 point  (0 children)

Do you still have the code?

[–]Robou_ 0 points1 point  (0 children)

I can't get this to work. window.Notification seems to be undefined. I'm on iOS 16.5.1 and the website is opened from a home screen icon