.正对ios升级得ios7 之后,plist文件必须放到 https得服务器上了,http不能够用了html
准备文件:plist文件,ipa安装包,html下载页面ios
.plist参照模板以下浏览器
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>items</key> <array> <dict> <key>assets</key> <array> <dict> <key>kind</key> <string>software-package</string> <key>url</key> <string>https://test.company.com.cn/m/moa/test.ipa</string> // 软件安装包,安装包所在的服务器路径 </dict> <dict> <key>kind</key> <string>full-size-image</string> <key>needs-shine</key> <false/> <key>url</key> <string>https://test.company.com.cn/m/abc/test-512.png</string> //在itunes上点事的图片路径 </dict> <dict> <key>kind</key> <string>display-image</string> <key>needs-shine</key> <false/> <key>url</key> <string>https://test.company.com.cn/m/moa/test-57.png</string> // 安装应用显示的图片 </dict> </array> <key>metadata</key> <dict> <key>update-url</key> <string>https://test.company.com.me/iosLocal.plist</string> // 版本更新URL <key>bundle-identifier</key> <string>com.zte.test</string> // 应用bundle-identifier <key>bundle-version</key> <string>3.0.3</string> // 用用版本号 <key>kind</key> <string>software</string> <key>title</key> <string>ipa包部署测试</string> // 安装应用显示的名称 </dict> </dict> </array> </dict> </plist>
ipa安装包放入plist指定的software-package安装包路径服务器
经过itms-services协议,在safari浏览器能够直接在ios设备上安装应用程序。itms-services协议须要一个plist配置文件。app
经过浏览器访问下载plist地址提示证书无效,解决方式是经过提供一个下载的html解决,而且下载连接须要包含<a href='itms-services://?action=download-manifest&url=https://test.company.com.cn/download/test.plist'>下载</a>, itms-services://?action=download-manifest是固定不变的,url根据环境变化ide
若是须要二维码的话,能够根据html下载页面生成二维码就ok.测试
[[UIApplication sharedApplication] openURL:@"itms-services://?action=download-manifest&url=https://test.com.cn/Admin/test.plist"];