EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="
http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>应用名字</title>
</head>
<body>
<h1 style="font-size:40pt">iOS应用OTA安装<h1/>
<h1 style="font-size:40pt">
<a title="iPhone" href="itms-services://?action=download-manifest&url=
https://192.168.3.112/manifest.plist">点击安装</a>
<h1/>
<a title="iPhone" href="
http://192.168.3.112/192.168.3.112.crt">ssl 证书安装</a>
<h1/>
</body>
</html>
其中,
https://192.168.3.112/manifest.plist指向打包生成的plist文件,
http://192.168.3.112/192.168.3.112.crt指向服务器中的CA证书,也就是上述生成crt证书,因此,需要将上述生成的crt证书copy到web服务器目录下。
总结实现原理
OTA方式安装,是通过Safari解析链接中的"itms-services://"来实现的。
例如:
<a title="iPhone" href="itms-services://?action=download-manifest&url=
https://192.168.10.193/installIPA.plist"> Iphone Download</a>
Safari会去读取installIPA.plist中的信息,如:iOS应用的名称、版本、安装地址等。
参考
https://www.jianshu.com/p/35ca63ec0d8e作者:Justin_W
链接:
https://www.jianshu.com/p/b7bc639639fc來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。