pusher / push-notifications-web

Beams Browser notifications
MIT License
39 stars 19 forks source link

Safari Support #142

Closed cl0ckwork closed 1 year ago

cl0ckwork commented 1 year ago

I've followed the walkthrough here to setup certificates, ive also installed the 2.0.1 sdk, and I see the following issue in safari on the local app.

[Error] Unhandled Promise Rejection: SecurityError: Script http://localhost:3000/service-worker.js?pusherBeamsWebSDKVersion=2.0.1 load failed

this works fine on Chrome via localhost - I've looked around and can't seem to find anything obvious, is there something i am missing? also, is this correct? i thought safari would be supported, based on the docs (referenced above) https://github.com/pusher/push-notifications-web/blob/13c861e66c60a498cdaa9c170574f63f6a8a74de/src/push-notifications.js#L536

seeing this locally as well

image
ghost commented 1 year ago

You have to install 2.0.0-beta.2 for working push notifications in safari desktop. Mobile safari is not yet supported by beams. Also check the allowed host.

benw-pusher commented 1 year ago

@b6oh is correct, at this time we don't support web push on Safari / iOS and you would need to use the beta version of the library for native Safari notifications.

benw-pusher commented 1 year ago

We will use https://github.com/pusher/push-notifications-web/issues/146 to keep track of this request