问题描述
我正在尝试在我的ReactJS应用程序中实现FCM推送通知。
它完全适用于chrome和firefox浏览器,但在safari浏览器中遇到问题。
I am trying to implement FCM push notification in my ReactJS application.It is working in chrome and firefox browser perfectly but facing in an issue in safari browser.
我还查看了firebase的文档,发现它只支持3个浏览器。
I also gone through the documentation of firebase also found that it only supports on only 3 browsers.
-
Chrome
Chrome
Firefox
Safari
在safari浏览器中是否有任何方法可以支持同样。
Is there any method to supports in safari browser as well.
推荐答案
Safari 11.1已经支持 serviceWorker
,但它仍然不支持FCM Javascript API也需要 PushAPI
。
Safari 11.1 already supported serviceWorker
, but it still didn't support PushAPI
that is also needed by FCM Javascript API.
取自Firebase文档():
Taken from Firebase documentation (https://firebase.google.com/docs/cloud-messaging/js/client) :
这是受支持的br owser list: Safari仍然不支持Push API
Here is the supported browser list: https://caniuse.com/#feat=push-api that states that Safari still not supporting Push API
这篇关于ReactJS - FCM无法在safari浏览器中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!