iOS 13.3 渐进式网页应用元标记不起作用



在我的网页<head>内,我有:

<meta name="apple-mobile-web-app-capable" content="yes">

根据Apple开发人员的说法,这就是该应用程序以"独立"模式启动所需的全部内容。但是,当单击我添加到主页的书签时,它会在默认的 safari 中启动,而不是它自己的实例。让我感到困惑的是,我从上周制作的另一个网页上复制了这些标签,该网页确实有效。

我做错了什么吗?

提前感谢您的任何答案,如果需要,我非常愿意提供更多的 html 文件。

全头:

<head>
<title>XXXXXX</title>
<link rel="manifest" href="manifest.json">
<link rel="icon" href="icon.jpeg">
<meta name="viewport" content="user-scalable=no">
<meta name="apple-mobile-web-app-title" content="XXXXXX">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="apple-touch-icon" href="icon.jpeg">
</head>

manifest.json:

{
"name": "XXXXXX",
"short_name": "XXXXXX",
"description": "Placeholder",
"lang": "en-GB",
"start_url": "/index.php",
"scope": "/",
"display": "standalone",
"theme_color": "#ffffff",
"icons": [
{
"src": "icon.jpeg",
"type": "image/jpeg",
}
],
}

我的网页确实使用了 iframe,但我看到其他 Web 应用程序使用它并且仍然按预期运行。

清单末尾的逗号不应该存在,并导致清单无效,因此 iPhone 会忽略清单并将 Web 应用程序作为普通书签启动。

清单的结尾应该是...

}
]
}

相关内容

最新更新