iOS 基於 itemServices 進行本地安裝 ipa 應用安裝包

itemServices 協議

itemServices 是蘋果推出的一款協議.基於這款協議,咱們在本地部署一個服務器,將 ipa 包存放到本地服務器.而後,測試人員只要經過 iOS 測試設備的 Safari 瀏覽器訪問特定的地址,就能夠經過內網更新 app瀏覽器

簡單實現

1.準備工做

在進行功能實現之前,咱們須要瞭解如下的準備內容服務器

項目打包後的文件,使用企業分發方式打出的一個 xxx.ipa 包(若是選擇 Development, 則只能使用註冊過的設備進行內測,若是選擇 EnterPrise 打包的話,不只能夠內測,還能夠提供給外部人員使用);
一個 xxx.plist 文件,內容以下,生成成功之後使用 Xcode 查看是否可以成功打開;app

<!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:ide

https://blog.csdn.net/weixin_34290000/article/details/87141847測試

https://www.jianshu.com/p/550545eb505furl

相關文章
相關標籤/搜索