2

我有 4 个支持 webapp 的网络应用程序,每个应用程序在同一个域上都有不同的 URL。当我在 iOS 7 iPad 上为所有 4 个设置主屏幕图标时,图标开始交换并在我设置它们时相互混淆。为了更清楚,这里是第 1 页的代码。

<html>
    <head>
        <title>Test 1</title>
        <meta charset="UTF-8">
        <link rel="apple-touch-icon" sizes="72x72" href="/images/iconPurple72.png" />
        <!-- iPad - landscape (748x1024) -->
        <link rel="apple-touch-startup-image" href="images/ipadLandscape7.png"  media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape)" />
        <!-- iPad - portrait (768x1004) -->
        <link rel="apple-touch-startup-image" href="images/ipadPortrait7.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)" />
        <!-- iPhone - (320x460) -->
        <link rel="apple-touch-startup-image" href="/images/startup7.png" media="screen and (min-device-width: 200px) and (max-device-width: 320px) and (orientation:portrait)" />
        <!-- enable full-screen mode  -->
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <!-- controls the appearance of the status bar in full-screen mode  -->
        <meta name="apple-mobile-web-app-status-bar-style" content="black" />
        <meta name = "viewport" content = "width = device-width,initial-scale = 1.0, user-scalable = yes"/>
    </head>
    <body>
        <div><h1>this is test 1</h2></div>
    </body>
</html>

..pages 2,3 和 4 完全相同,除了这一行:

 <link rel="apple-touch-icon" sizes="72x72" href="/images/iconPurple72.png" />

...每个页面指向同一目录中的不同图像

行为不一致,但可以在设备和模拟器上看到。当 ipad 重新启动时,图标会正常显示,就像它们最初设置的那样。有时,在重新启动之前,点击设置另一个页面后更改的图标可能会导致 iPad 锁定。

有任何想法吗?

4

1 回答 1

1

您是否链接到每个应用程序中的其他应用程序?如果您使用不同的 加载页面apple-touch-icon,它将替换主屏幕上的网络应用程序图标。(这就是Sun等 Web 应用程序更新图标的方式。)

但听起来您遇到的是 iOS 7 中的一个错误,当您拥有 3 个或 4 个或更多 Web 应用程序时会导致奇怪的事情发生。图标可以交换,点击一个可以打开另一个,等等。重新启动你的 iOS 设备通常可以解决这个问题,尽管这显然是一个错误。

iOS 7 在 Web 应用方面似乎确实存在缺陷。例如,您可能已经注意到,浏览器对话框(例如警报、确认、HTTP 身份验证等)不起作用,外部链接(无论是在 Safari 中打开的链接还是带有tel协议的电话号码)也不起作用)。启动图像最初被拉伸并以非常生涩的方式缩放。Web 应用程序的多任务预览显示一个空白的白色屏幕。奇怪的是,Apple 会公开发布这种错误的东西。

于 2013-10-04T16:47:45.757 回答