Next-PWA安装弹出窗口在移动设备上不起作用

时间:2020-08-27 17:37:45

标签: javascript next.js progressive-web-apps next

我已经构建了一个Next.js应用程序。现在,对于PWA,我正在使用Next-PWA库: https://yarnpkg.com/package/next-pwa

我只能在台式机的Google Chrome上看到安装弹出消息。我希望它也可以在移动设备上工作

这是我保存在公用文件夹中的manifest.json文件。

{
    "name": "APP NAME FULL",
    "short_name": "APP NAME",
    "icons": [
        {
            "src": "/favicon.ico",
            "sizes": "48x48",
            "type": "image/ico"
        },
        {
            "src": "/images/clubicon.png",
            "sizes": "200x200",
            "type": "image/png"
        }
    ],
    "theme_color": "#FFFFFF",
    "background_color": "#FFFFFF",
    "start_url": "/",
    "display": "standalone"
}

这是我的next.config.js文件:

const withPwa = require('next-pwa');

module.exports =
  withPwa(
    {

// other configs...
      pwa: {
        dest: 'public',
        register: true,
        scope: '/',
        disable: false,
        register: true,
      }
    })

this is the chrome dev tool showing service worker status.

0 个答案:

没有答案