JP89
JP89

Reputation: 33

"Add to home screen" icon not working on iOS 13 with HTTPS

With iOS 13, the "Add to Home Screen" icon is no longer populating, and remains a screenshot of the page:

Image for iOS 13 on iPad: https://i.ibb.co/StxckYP/20191017-125540.jpg

With iOS prior to 13, the icon is created normally:

Image for iOS 12 on iPod: https://i.ibb.co/JqVFZgd/20191017-125423.jpg

It appears to be a certificate issue, as it populates normally over HTTP. Also it works with a global CA signed certificates (GoDaddy). With a private CA signed certificate it does not.

Server is IIS in both cases. Page otherwise works normally over HTTPS.

Meta tag for the icon:

<link id="apple-touch-icon" rel="apple-touch-icon" href="resources/images/app-test114.png">

Batch script for creating 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

Config file for 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

Batch script for creating web hosting certificate:

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

Config file for certificate:

[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

Prior to getting the correct certificates, when I had to allow for a certain URL to open with an unsecure https connection, the behaviour was the same. Once certificates were fixed, the icon populated normally. With update to iOS 13, icon stopped working normally.

Is there any way to find out why the icon is not loaded?

Upvotes: 2

Views: 1943

Answers (1)

JP89
JP89

Reputation: 33

The link from Hudgi resolved the issue.

https://support.apple.com/en-us/HT210176

It was the required key size of 2048 bit, and my key was 1024 bit. The reason the page was otherwise working is that it was cached.

Upvotes: 1

Related Questions