Closed labrocca closed 1 year ago
Since this year iOS now handles Web Pushes on Apple iPhones, will this be updated to support it?
This library already works with Safari + iOS, I've tested it.
Since I don't have an iOS device I'm not able to really test myself. Are you saying that the current setup I have which works on desktops (Apple, Windows), Chrome, and other browsers will work on iOS Safari without any edits or updates?
@labrocca It should, but there are some caveats. For example on iOS, a person has to add the app to their home screen via the share menu first, then launch the app from the home screen icon (which resets all cookies/localstorage), and then subscribe to push based on a callback triggered on a user gesture such as clicking a button.
Provided you handle the push registration correctly with Notification.permission
and serviceWorkerRegistration.pushManager.subscribe
etc. (which this library does not really help with as far as I understand), then it will work correctly.
PS. You need a physical device to test this. When I was trying it out in the XCode Simulator it did not work, as the Simulator cannot create push tokens at all.
Does the library work with the release 3.2.2 or do I have to update the code, I see a lot of recent edits.
Also, thank you for the responses. I'm very bad at JS (PHP Coder) and I'm afraid I will break my existing working notification trying to get Apple to work.
@labrocca The GitHub tags do not seem to be updated, the latest version on NPM is 3.6.3 which works. I cannot answer if a version from 2017 works or not.
NOTE: Please test in a least two browsers (i.e. Chrome and Firefox). This helps with diagnosing problems quicker.
Setup
Operating System: <Linux | Windows | OS X> Node Version: <4.2 | 6.0 | ...> web-push Version: <1.0.0>
Problem
Expected
Features Used
Example / Reproduce Case
Other
Since this year iOS now handles Web Pushes on Apple iPhones, will this be updated to support it?