Closed jimvvv closed 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.
I do not have ios device to debug this. Will try to debug in safari or emulator.
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.
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.
As of today, iOS 16.4 is now supporting Web Push Notification from Safari. Could anyone help confirm that this package also supports that?