safwanrahman / django-webpush

Web Push Notification Package for Django
GNU General Public License v3.0
368 stars 106 forks source link

iOS 16.4 Support #116

Closed jimvvv closed 1 year ago

jimvvv commented 1 year ago

As of today, iOS 16.4 is now supporting Web Push Notification from Safari. Could anyone help confirm that this package also supports that?

ksavila commented 1 year ago

From what I have found through testing, it does not. I think this mostly has to do with the fact that the service worker that this repo uses does not implement an 'install' method. According to Webkit, web apps have to be "added to homescreen" in order to receive web push notifications on iOS. "Now with iOS and iPadOS 16.4 beta 1, we are adding support for Web Push to Home Screen web apps.".

My site has a separate service worker for the PWA side of the house. It implements the install method as well as some caching stuff. I think because THIS service worker doesn't also support the "push" method, it doesn't work.

I could be wrong though. I can't properly debug because you can only debug iOS mobile safari with a connected MacOS device.

safwanrahman commented 1 year ago

I do not have ios device to debug this. Will try to debug in safari or emulator.

jimvvv commented 1 year ago

I've tried same code which is working for chrome and firefox. It failed on iPadOS16.4. As WebKit said, we need to share the web app to Home Screen. But it still didn't work. I think it's not related to this package, it could be the issue from iOS platform.

fabianbrn commented 1 year ago

It would be awesome if this worked for iOS. It may be due to the lack of the 'install' method. Safwan i would really thank you if you could make this work.