【问题标题】:NW.js chrome.gcm. API doesn't workNW.js chrome.gcm。 API 不起作用
【发布时间】:2017-01-27 08:30:48
【问题描述】:

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

NW.js在this article表示会继续支持chrome API,但是使用chrome.gcm.register时无法获取注册ID。

有这方面的消息吗?这个 API 还受支持吗?

【问题讨论】:

    标签: google-cloud-messaging google-chrome-app node-webkit nwjs


    【解决方案1】:

    如Transitioning from Chrome apps on Windows, Mac, and Linux 中所述,Chrome 打包和托管应用在可预见的未来仍将仅在 Chrome 操作系统上得到支持和维护。进一步说明:

    Chrome 打包和托管应用将在现在和 2018 年初期间在 Windows、Mac 和 Linux 上停用。有关详细信息,请参阅 2016 年 8 月的Chromium blog post。

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

    【讨论】:

      【解决方案2】:

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

      示例(OS X):

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

      【讨论】:

        猜你喜欢
        • 2018-08-04
        • 1970-01-01
        • 1970-01-01
        • 2016-11-05
        • 2023-04-11
        • 2023-03-04
        • 1970-01-01
        • 1970-01-01
        • 2019-01-13
        相关资源
        最近更新 更多