iOS设备未使用PWA-Icon [英] PWA-Icon not used by iOS Devices

查看:89
本文介绍了iOS设备未使用PWA-Icon的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这就是我在index.html的标题部分中的内容:

This is what I have in my head section of index.html:

<head>
  <meta charset="utf-8">
  <title>MeasurementProtocols</title>
  <base href="/index.html">

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="./assets/icons/apple/touch-icon-ipad.png">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link rel="manifest"  crossOrigin="use-credentials" href="manifest.json">
  <link rel="apple-touch-icon" href="./assets/icons/apple/touch-icon-iphone.png">
  <link rel="apple-touch-icon" sizes="120x120" href="./assets/icons/apple/touch-icon-ipad.png">
  <link rel="apple-touch-icon" sizes="152x152" href="./assets/icons/apple/touch-icon-iphone-retina.png">
  <link rel="apple-touch-icon" sizes="180x180" href="./assets/icons/apple/touch-icon-ipad-retina.png">
  <meta name="theme-color" content="#1976d2">
</head>

如果我想通过Apple设备将网页添加到主屏幕,iPhone会将屏幕截图作为图标,尽管我将图标添加到index.html上,因为苹果在以下位置上对其进行了描述:

If I want to add the webpage to homescreen via an Apple device, the iPhone would take a screenshot as icon, although I added the icons to the index.html as apple describes it on: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html

那我想念的是什么?或者将href指向资产而不是主文件夹对它不起作用?

So what am I missing, or does it not work with having href directed to assets and not the mainfolder?

推荐答案

带有图标的PWA不适用于iOS上的Web服务器上的身份验证.解决方案是删除身份验证.

PWA with Icons don't work with authentication on a Webserver on iOS. Solution is to remove the Authentication.

这篇关于iOS设备未使用PWA-Icon的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆