こんにちは
manifest.json を作っていたのですが Chrome の開発者ツール → Application → Add to homescreen をしたら Site cannot be installed: no matching service worker detected. You may need to reload the page, or check that the service worker for the current page also controls the start URL from the manifest
とでました。
コードはこれです。
JSON
1{ 2 "name": "example.com", 3 "short_name": "example", 4 "start_url": "/?ref=manifest.json", 5 "display": "standalone", 6 "theme_color": "#fff", 7 "background_color": "#fff", 8 "icons": [ 9 { 10 "src": "http://example.com/favicon-144x144.png", 11 "sizes": "144x144", 12 "type": "image/png" 13 }, 14 { 15 "src": "http://example.com/favicon-192x192.png", 16 "sizes": "192x192", 17 "type": "image/png" 18 }, 19 { 20 "src": "http://example.com/favicon-512x512.png", 21 "sizes": "512x512", 22 "type": "image/png" 23 } 24 ], 25 "prefer_related_applications": false, 26 "related_applications": [ 27 { 28 "platform": "web" 29 } 30 ] 31}
あなたの回答
tips
プレビュー