cocos / cocos-engine

Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.
https://www.cocos.com/en/creator
Other
7.99k stars 1.91k forks source link

在"浏览器预览"时,会收到 Chrome 的 apple-mobile-web-app-capable 弃用警告 #17751

Closed puxiao closed 2 days ago

puxiao commented 3 days ago

Cocos Creator version

3.8.4

System information

Window11

Issue description

预览栏 > 浏览器预览 > Chrome 控制台查看该警告:

<meta name="apple-mobile-web-app-capable" content="yes"> is deprecated. Please include <meta name="mobile-web-app-capable" content="yes">


我查询了一下资料:


该标签涉及到的文件有:


解决方案1:直接使用 mobile-web-app-capable 替换 apple-mobile-web-app-capable

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


2 个知名框架就是这样做的:


解决方案2:2个标签共存

简单来说就是把 2 个标签都定义一次:

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


具体该怎么做,要不要直接采用 替换方式,需要衡量一下。

wuzhiming commented 2 days ago

Thinks we will add the other meta tag at v3.8.5

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