我有一个网络应用程序设置为Mobile Safari的主屏幕应用程序。我定义了一系列启动图像,并且它们在运行iOS 8的多个iPad和iPhone设备上完美地工作。当我在运行iOS 9的设备上设置相同的应用程序时,图片不会出现。
我已经验证了这些图片位于服务器上。我已经从运行iOS 8和iOS 9的设备的主屏幕中删除了该应用程序,强制退出Safari,清除了缓存,然后重新将应用程序添加到主屏幕。这是进行的一个理智检查,以确保没有涉及缓存问题。
我已经查看了在iOS 8中有效的常见方法,以查看是否存在可能仍然有效的变化,例如在以下位置找到的方法:
- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/
- iOS Web应用程序的多个“apple-touch-startup-image”分辨率(尤其是iPad)?
- 是否有iPad的等效“apple-touch-startup-image”?
所有这些都将我带回到同样的问题。在运行iOS 8时,启动图像对我可见,但在运行iOS 9时不可见。
还有其他人遇到这个问题吗?如果您使用运行iOS 9的主屏幕应用程序看到启动图像,请问您使用了哪些<link>
标签?
以下是我当前正在使用的配置,可在运行iOS 8时正常工作:
<!-- STARTUP IMAGES -->
<!-- iOS 6 & 7 iPad (retina, portrait) -->
<link href="~/assets/images/startup/startup-1536x2008.png" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
<!-- iOS 6 & 7 iPad (retina, landscape) -->
<link href="~/assets/images/startup/startup-2048x1496.png" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
<!-- iOS 6 iPad (portrait) -->
<link href="~/assets/images/startup/startup-768x1004.png" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">
<!-- iOS 6 iPad (landscape) -->
<link href="~/assets/images/startup/startup-1024x748.png" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">
<!-- iOS 6 & 7 iPhone 5 -->
<link href="~/assets/images/startup/startup-640x1096.png" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
<!-- iOS 6 & 7 iPhone (retina) -->
<link href="~/assets/images/startup/startup-640x920.png" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
<!-- iOS 6 iPhone -->
<link href="~/assets/images/startup/startup-320x460.png" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">