douxianglu4370 2018-02-09 12:33
浏览 295
已采纳

我的manifest.json出了什么问题

I'm trying to add a manifest.json to my web app (made in php) so the users can add it to their homescreen.

Here's my manifest json:

{
  "name": "OrganizaMeuCasamento",
  "short_name": "MeuCasamento",
  "theme_color": "#995a6d",
  "background_color": "#000000",
  "orientation": "portrait",
  "display": "fullscreen",
  "start_url": "https://meucasamento.organizaeventos.net",
  "icons": [
    {
      "src": "logopwa.png",
      "sizes": "70x70",
      "type": "image/png"
    }
    {
    "src": "icon-256x256.png",
    "sizes": "256x256",
    "type": "image/png"
    }
  ]
}

I linked it on my index.php but on my GoogleDevTools it doesn't get recognized. What have I done wrong? It's a error on manifest.json itself or on the link on index.php

here is the link: meucasamento.organizaeventos.net

image of GoogleDevTools googledevtools-no-manifest-detected

  • 写回答

1条回答 默认 最新

  • dsfliu1129 2018-02-09 12:36
    关注
    {
      "name": "OrganizaMeuCasamento",
      "short_name": "MeuCasamento",
      "theme_color": "#995a6d",
      "background_color": "#000000",
      "orientation": "portrait",
      "display": "fullscreen",
      "start_url": "https://meucasamento.organizaeventos.net",
      "icons": [
        {
          "src": "logopwa.png",
          "sizes": "70x70",
          "type": "image/png"
        },
        {
        "src": "icon-256x256.png",
        "sizes": "256x256",
        "type": "image/png"
        }
      ]
    }
    

    you forgot one , inside your icon array. Now it should work if you use the good tag inside your html

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?