itemServices 協議
itemServices 是蘋果推出的一款協議.基於這款協議,我們在本地部署一個服務器,將 ipa 包存放到本地服務器.然后,測試人員只要通過 iOS 測試設備的 Safari 瀏覽器訪問特定的地址,就可以通過內網更新 app
簡單實現
1.准備工作
在進行功能實現以前,我們需要了解以下的准備內容
項目打包后的文件,使用企業分發方式打出的一個 xxx.ipa 包(如果選擇 Development, 則只能使用注冊過的設備進行內測,如果選擇 EnterPrise 打包的話,不僅可以內測,還可以提供給外部人員使用);
一個 xxx.plist 文件,內容如下,生成成功以后使用 Xcode 查看是否能夠成功打開;
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <array> <array> <dict> <key>assets</key> <array> <dict> <key>kind</key> <string>software-package</string> <key>url</key> <string>https://ipa.xxxx.com/20190531/xxxx.ipa</string> </dict> <dict> <key>kind</key> <string>full-size-image</string> <key>needs-shine</key> <true/> <key>url</key> <string>https://kaig.chuangkegf.com/profile/down_image_57.png</string> </dict> <dict> <key>kind</key> <string>display-image</string> <key>needs-shine</key> <true/> <key>url</key> <string>https://kaig.chuangkegf.com/profile/down_image_512.png</string> </dict> </array> <key>metadata</key> <dict> <key>title</key> <string>惠普眾聯</string> <key>bundle-version</key> <string>版本號</string> <key>kind</key> <string>software</string> <key>bundle-identifier</key> <string>com.wanshang.WuHanLoan(app 的 bundleID)</string> </dict> </dict> </array> </array> </plist>
2.把IPA包和plist文件放到自己的服務器(https://)。
3.生成一個訪問plist文件的地址,在Safari上打開即可。
itms-services://?action=download-manifest&url=https://www.xxx.com/20190530/xxxx.plist
<a href="itms-services://?action=download-manifest&url=https://www.xxx.com/20190530/xxxx.plist">下載安裝</a>
PS:
https://blog.csdn.net/weixin_34290000/article/details/87141847
https://www.jianshu.com/p/550545eb505f
