在iOS 13中,“添加到主屏幕”图标不再填充,并且仍然是页面的屏幕截图:
[iPad上的iOS 13图像:https://i.ibb.co/StxckYP/20191017-125540.jpg
使用13之前的iOS,通常会创建图标:
[用于iPod上的iOS 12的图像:https://i.ibb.co/JqVFZgd/20191017-125423.jpg
这似乎是证书问题,因为它通常通过HTTP填充。它也与全局CA签名证书(GoDaddy)一起使用。使用私有CA签名的证书则没有。
在两种情况下,服务器都是IIS。页面否则可以通过HTTPS正常工作。
图标的元标记:
<link id="apple-touch-icon" rel="apple-touch-icon" href="resources/images/app-test114.png">
用于创建CA的批处理脚本:
openssl req -x509 -newkey rsa:1024 -sha256 -days 3650 -nodes -keyout ca.key -out ca.crt -config ca.conf
openssl pkcs12 -export -out ca.pfx -inkey ca.key -in ca.crt
pause
CA的配置文件:
[req]
distinguished_name=information
prompt=no
x509_extensions=v3_ca
[information]
C=...
ST=...
L=...
O=...
OU=...
CN=...
[v3_ca]
subjectKeyIdentifier=hash
extendedKeyUsage=critical,serverAuth,clientAuth
basicConstraints=CA:true
keyUsage=cRLSign,keyCertSign,digitalSignature,nonRepudiation,keyEncipherment,dataEncipherment,keyAgreement,keyCertSign,cRLSign
用于创建虚拟主机证书的批处理脚本:
openssl req -newkey rsa:1024 -sha256 -nodes -keyout cert.key -out cert.csr -config cert.conf
openssl x509 -sha256 -req -in cert.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out cert.crt -days 365 -extfile cert.conf -extensions extensions
openssl pkcs12 -export -out cert.pfx -inkey cert.key -in cert.crt
pause
用于证书的配置文件:
[req]
distinguished_name=information
prompt=no
[information]
C=...
ST=...
L=...
O=...
OU=...
CN=...
[extensions]
subjectAltName=@alt_names
[alt_names]
DNS.1=localhost
IP.1=192.168.77.132
在获得正确的证书之前,当我不得不允许使用不安全的https连接打开某个URL时,行为是相同的。修复证书后,该图标将正常填充。随着iOS 13的更新,图标停止正常工作。
有没有办法找出为什么未加载图标的原因?
来自Hudgi的链接解决了该问题。
https://support.apple.com/en-us/HT210176
这是必需的2048位密钥大小,而我的密钥是1024位。页面原本可以工作的原因是它已被缓存。