NW.js chrome.gcm。 API 无效

NW.js chrome.gcm. API doesn't work

我有 chrome 打包的应用程序,我在那里使用 GCM。

NW.js表示会在this article中继续支持chromeAPI,但是我在使用[=13=时获取不到注册ID ].

有这方面的消息吗?这 API 仍然受支持吗?

Transitioning from Chrome apps on Windows, Mac, and Linux 中所述,Chrome 打包和托管应用程序将在可预见的未来 Chrome OS[= 继续受到支持和维护17=] 只有。进一步说明:

Chrome packaged and hosted apps will be discontinued on Windows, Mac, and Linux over the course of now and early 2018. For more information, refer to the August 2016 Chromium blog post.

对于这个问题,请尝试阅读上面给定的文档,了解打包应用程序的推荐迁移选项。

解决方案是在命令行中使用 --enable-gcm 标志。

示例(OS X):

open -n -a nwjs --args --enable-gcm /path/to/app/