1

We implemented push notifications using FCM in chrome and firefox and it worked fine, but In Safari we are getting following error:

Unhandled Promise Rejection: FirebaseError: Messaging: This browser doesn't support the API's required to use the firebase SDK. (messaging/unsupported-browser).

Did anyone deal with this kind of issues? any suggestions?

Mahesh Gaikwad
  • 192
  • 2
  • 18
  • As the error says [Safari doesn't support web push](https://caniuse.com/#feat=push-api), which FCM relies on for browser support. So that means that Safari can't receive FCM notifications. – Frank van Puffelen Dec 03 '18 at 09:29

1 Answers1

3

The documentation is quite explicit about this:

The FCM JavaScript API lets you receive notification messages in web apps running in browsers that support the Push API. This includes the browser versions listed in this support matrix.

As the error says (and the caniuse.com support matrix confirms) Safari doesn't support web push, which FCM relies on for browser support. So that means that Safari can't receive FCM notifications.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • 1
    Safari 12 does suppoprt push notifications, with their "own" implementation. Are we supposed to believe that Google does not have enough budget to hire a programmer to implement their implementation for Firebase? – andreszs Sep 22 '19 at 21:49
  • If you check the support matrix on caniuse.com, it shows that Safari 12 still doesn't support the push API: https://caniuse.com/#search=push – Frank van Puffelen Sep 23 '19 at 05:14
  • Frank, caniuse.com is outdated in this case: See the Preferences dialog from Safari 12: https://photos5.appleinsider.com/gallery/26524-37870-safari-notifications-permission00004-l.jpg – andreszs Sep 24 '19 at 14:34
  • @andreszs Safari may support push notifications, but that doesn't mean they support Web Notifications (which is a standard). Last time I checked, Safari used its own implementation and that's what Frank is saying? – REJH Apr 12 '20 at 15:46
  • Can't edit my previous comment anymore. I mistakenly wrote "Web Notifications" where i meant "Push API". It isn't even listed on their [Webkit Features](https://webkit.org/status/) page so it's either not going to happen at all or it's going to take a loooong time :( – REJH Apr 12 '20 at 16:25