【发布时间】:2015-12-19 17:02:27
【问题描述】:
我有一个 Web 应用程序设置为针对 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/
- Mulitple "apple-touch-startup-image" resolutions for iOS web app (esp. for iPad)?
- Is there an equivalent apple-touch-startup-image for the IPAD?
所有这些都让我回到了同样的问题。我在运行 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">
【问题讨论】:
-
归档 rdar://22838418。
-
这是 iOS9 的一个已知问题:forums.developer.apple.com/thread/23924。
-
我花了一天半的时间寻找这个问题的答案,终于找到了。看起来......没有解决方案。 ARRGS!
-
也提交了 rdar(编号为 24415360)。我建议所有偶然发现此问题的人通过bugreport.apple.com 向 Apple 投诉以引起他们的注意。
-
在 iOS 9.3 beta 2 (13E5191d) 中仍未修复,我使用 XCode 的模拟器对此进行了测试。
标签: ios web-applications mobile-safari ios9