简体   繁体   中英

pwa angular 8 doesn't show "add to my home screen popup"

my app is a an angular pwa, but it's not suggesting to install on google chrome, the button is also not showing up and also on f12, application, identification the button to add to home screen is not there. Anything wrong with my manifest?

{
  "name": "aaaa",
  "short_name": "aaa",
  "theme_color": "#1976d2",
  "background_color": "#fafafa",
  "display": "standalone",
  "scope": "./",
  "start_url": "/aaa/",
  "orientation": "landscape",
  "prefer_related_applications": true,

  "icons": [

    {
      "src": "assets/icons/android-icon-36x36.png",
      "sizes": "72x72",
      "type": "image/png"
    },
    {
      "src": "assets/icons/android-icon-48x48.png",
      "sizes": "72x72",
      "type": "image/png"
    },

    {
      "src": "assets/icons/android-icon-72x72.png",
      "sizes": "72x72",
      "type": "image/png"
    },
    {
      "src": "assets/icons/android-icon-96x96.png",
      "sizes": "96x96",
      "type": "image/png"
    },
    {
      "src": "assets/icons/android-icon-144x144.png",
      "sizes": "144x144",
      "type": "image/png"
    },
    {
      "src": "assets/icons/android-icon-192x192.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "assets/icons/apple-icon-57x57.png",
      "sizes": "57x57",
      "type": "image/png"
    },  
    {
      "src": "assets/icons/icons-512.png",
      "type": "image/png",
      "sizes": "512x512"
    }

  ]
}

the images are indeed in those locations and I have zero errors when I run lighthouse audits

One of the criteria for this to show up is that prefer_related_applications cannot be true, which it is in your manifest.

You can check the documentation for it here: https://developers.google.com/web/fundamentals/app-install-banners/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM