简体   繁体   English

Apple 触摸图标主屏幕失败

[英]Apple Touch Icon Home Screen Fails

Having read how to add a custom home screen icon for my web app, I have spent days trying to make it work and whatever I do, the Add to Home Screen process results in an icon based on the screen shot of the current web page.阅读了如何为我的 Web 应用程序添加自定义主屏幕图标后,我花了几天时间尝试使其正常工作,无论我做什么,“ Add to Home Screen过程都会根据当前网页的屏幕截图生成一个图标。

  • I have tried using the default file names alone我曾尝试单独使用默认文件名
  • I have tried using the <link rel="" href=""> definitions and the icons我尝试使用<link rel="" href="">定义和图标
  • I have tried putting the icons in the root directory and one level down我试过把图标放在根目录下一层
  • I have tried 57x57, 72x72 and 114x114 sized icons, with and without the sizes definition我尝试过 57x57、72x72 和 114x114 大小的图标,有和没有大小定义
  • I have tried precomposed and normal with and without the corresponding change to the rel name我试过 precomposed 和 normal 有和没有对 rel 名称的相应更改

But whatever I do the Add to Home Screen process on my iPhone 4 running iOS 6.3 ignores whatever icon I define and gives me a screen shot based icon.但是无论我做什么,在运行 iOS 6.3 的 iPhone 4 上Add to Home Screen过程都会忽略我定义的任何图标,并为我提供一个基于屏幕截图的图标。 I am tearing my hair out.我正在撕我的头发。

How can I find what is going wrong?我怎样才能找到问题所在? How do I debug this process to find what is wrong?我如何调试这个过程以找出问题所在? I have mobile safari linked to safari on the desktop to see what is going on but I am none the wiser.我将移动 safari 链接到桌面上的 safari 以查看发生了什么,但我并不聪明。

You might be missing some meta definitions.您可能缺少一些元定义。 For example this works in our web apps.例如,这适用于我们的网络应用程序。 Check that the png you're using is valid image.检查您使用的 png 是否为有效图像。

<!DOCTYPE html>
<head>
    <link rel="apple-touch-icon" href="/img/appicon-57.png" />
    <link rel="apple-touch-icon" sizes="72x72" href="/img/appicon-72.png" />
    <link rel="apple-touch-icon" sizes="114x114" href="/img/appicon-114.png" />
    <link rel="shortcut icon" href="favicon.png" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
</head>
<body>
...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM