2

I am having trouble to get the install prompt to load and ask the user to add to home screen I do not not understand where to add the code to what file. I am running a wordpress site. I have an manifest as well as the service worker but I cant get the add to homescreen to popup on mobile devices and or desktop. Please help me

Manifest code below

{
"lang": "en",
"short_name": "canvasesbegone.com",
"name": "CanvasesBeGone",
"icons": [
    {
  "src": "assets/icons/launcher-icon-1x.png",
  "type": "image/png",
  "sizes": "16x16"
},

{
  "src": "assets/icons/launcher-icon-2x.png",
  "type": "image/png",
  "sizes": "32x32"
},
    {
  "src": "assets/icons/launcher-icon-3x.png",
  "type": "image/png",
  "sizes": "48x48"
},
 {
  "src": "assets/icons/launcher-icon-4x.png",
  "type": "image/png",
  "sizes": "64x64"
},
{
  "src": "assets/icons/launcher-icon-5x.png",
  "type": "image/png",
  "sizes": "96x96"
},
{
  "src": "assets/icons/launcher-icon-6x.png",
  "type": "image/png",
  "sizes": "144x144"
},
{
  "src": "assets/icons/launcher-icon-7x.png",
  "type": "image/png",
  "sizes": "192x192"
},
{
  "src": "assets/icons/launcher-icon-8x.png",
  "type": "image/png",
  "sizes": "300x300"
},
 {
  "src": "assets/icons/launcher-icon-9x.png",
  "type": "image/png",
  "sizes": "512x512"
}
],
"start_url": "https://canvasesbegone.com/?utm_source=web_app_manifest",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#ffffff"

}

Here is the service-worker.js code

self.addEventListener('fetch', function(event){

});

TheMaster
  • 45,448
  • 6
  • 62
  • 85
  • Use the Chrome lighthouse tool to tell you exactly what you need to fix to make your site a working PWA. Each error it finds is included with details of what you need to fix. – Mathias Jul 12 '19 at 19:51
  • Mathias, your comment seems to suggest that if your site passes the PWA audit on Chrome's developer tools with 100% that the prompt to install should automatically happen. What if it doesn't? – Vincent Jul 23 '19 at 20:55

0 Answers0