要内网升级的话,需要搭建内网升级HTTPS服务器。
以APACHE为例:
1、下载支持SSL的APACHE服务程序,如果你已经有APACHE服务,可以查找mod_ssl.so,如果没有请重新下载
2、打开HTTPS支持,httpd.conf文件中,去掉下面两行的注释
LoadModule ssl_module modules/mod_ssl.so
Include conf/extra/httpd-ssl.conf
修改httpd-ssl.conf中证书信息
SSLCertificateFile "C:/ProgramerTools/WebServer/Apache2.2/conf/server.crt"
SSLCertificateKeyFile "C:/ProgramerTools/WebServer/Apache2.2/conf/server.key"
3、将httpd.conf及httpd-ssl.conf路径信息调整为正确路径
4、此时HTTP与HTTPS都可以访问APACHE服务了
5、构建升级网站
5.1、准备资源文件
57×57图标,512×512图标,in house发布签名的ipa文件,CA根证书
5.2、准备plist文件
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- array of downloads. -->
<key>items</key>
<array>
<dict>
<!-- an array of assets to download -->
<key>assets</key>
<array>
<!-- software-package: the ipa to install. -->
<dict>
<!-- required. the asset kind. -->
<key>kind</key>
<string>software-package</string>
<!-- required. the URL of the file to download. -->
<key>url</key>
<string>https://192.168.130.50/XXXXX.ipa</string>
</dict>
<!-- display-image: the 57*57 icon to display during download. -->
<dict>
<key>kind</key>
<string>display-image</string>
<key>url</key>
<string>https://192.168.130.50/XXXXX_57.png</string>
</dict>
<!-- full-size-image: the large 512x512 icon used by iTunes. -->
<dict>
<key>kind</key>
<string>full-size-image</string>
<key>url</key>
<string>https://192.168.130.50/XXXXX_512.png</string>
</dict>
</array>
<key>metadata</key>
<dict>
<!-- required -->
<key>bundle-identifier</key>
<string>程序的app id</string>
<!-- optional (software only) -->
<key>bundle-version</key>
<string>程序的版本</string>
<!-- required. the download kind. -->
<key>kind</key>
<string>software</string>
<!-- optional. displayed during download; -->
<!-- typically company name -->
<key>subtitle</key>
<string>厂商名称</string>
<!-- required. the title to display during the download. -->
<key>title</key>
<string>软件名称</string>
</dict>
</dict>
</array>
</dict>
</plist>
5.3、准备.htaccess文件,与plist文件放在一起
AddType text/xml .plist
AddType application/octet-stream .ipa
修改httpd.conf文件,让.htaccess文件生效
#升级文件所在的目录
AllowOverride FileInfo
5.4、准备网页
<html>
<body>
<a href="https://192.168.130.46/myCA.cer">Install CA Cert</a>
</br>
<a href="itms-services://?action=download-manifest&url=https://192.168.130.50/XXXXX.plist">Install My App over the air </a>
</body>
</html>
6、使用
6.1、HTTPS访问网页,下载CA证书,并添加到IOS的信任列表
6.2、点击安装App,然后就开始自动安装啦
7、自动升级
请Google或github一下iVersion