在 iOS 14.5 中添加“apple-mobile-web-app-capable”元标记的移动网络应用程序不显示全屏帖子

问题描述

我正在尝试使用 apple-mobile-web-app-capablemobile-web-app-capable标记为我使用 Ruby on Rails 构建的网络应用实现全屏视图。

我已经研究并尝试了这些答案中建议的解决方案,但似乎没有一个有效: After upgrade to iOS 11.3 web app does not show full screen per apple-mobile-web-app-capableMeta Tag "apple-mobile-web-app-capable" for Android? 等等。

最近写的文章,我遵循它来实现这一点是 - https://dev.to/oncode/display-your-pwa-website-fullscreen-4776

发帖后,我无法实现全屏效果,另一个问题是屏幕被压扁,宽度减小并保持高度(从而不保留样式)。这是完整的元数据:

<Meta name="viewport" content="width=device-width;initial-scale=1; viewport-fit=cover">
<Meta name="mobile-web-app-capable" content="yes">
<Meta name="apple-mobile-web-app-capable" content="yes">
<Meta name="apple-mobile-web-app-status-bar-style" content="dark-content">

和 assets/javascript/manifest.json 文件是:

{
    "name": "My App","display": "standalone","start_url": "/?standalone=true"
}

通过 <link rel="manifest" href="<%= asset_path 'manifest.json' %>"> 包含

在不同的屏幕尺寸、运行 iOS 14.5 的模拟器和应用页面书签上对此进行了测试。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)