[英]Importance of manifest.json for firebase web push
I am working on implementation of web push notifications using FCM library. 我正在使用FCM库实现Web推送通知。 I have created a service worker file in the root folder of the domain and another js file in the Project to show web push notifications.
我在域的根文件夹中创建了一个服务工作文件,在项目中创建了另一个js文件来显示Web推送通知。
The web push notifications are working fine and showing up in the browser. Web推送通知工作正常,并在浏览器中显示。 According to the documentation a manifest.json with a gcm sender id is required in the root folder.
根据文档,根文件夹中需要带有gcm发送者ID的manifest.json。 I have not created this web app manifest file, but still I can see the notifications in the Chrome browser.
我还没有创建此网络应用清单文件,但我仍然可以在Chrome浏览器中看到通知。
Could anyone clarify why exactly is manifest.json required. 任何人都可以澄清为什么manifest.json是必需的。
For Chrome to route FCM messages to the correct service worker, it needs to know the Sender ID
Have a look at these pages: 看看这些页面:
https://developers.google.com/web/fundamentals/push-notifications/ https://developers.google.com/web/ilt/pwa/introduction-to-push-notifications https://developers.google.com/web/fundamentals/push-notifications/ https://developers.google.com/web/ilt/pwa/introduction-to-push-notifications
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.