ipa如何通過網路進行安裝,ipa網路進行安裝

來源:互聯網
上載者:User

ipa如何通過網路進行安裝,ipa網路進行安裝

  蘋果手機端應用,如果發布的到Appstore上,往往比較複雜,周期也比較長,Over-the-Air是Apple在 iOS4 中新加的一項技術,目的是讓開發人員能夠脫離Appstore,實現從自己的伺服器下載並安裝iOS應用。簡單地說,就是使用者只需要在Safari中點開一條連結,就能直接在主介面中安裝App。

  在高版本的IOS上,plist必須要部署到https伺服器上,才能正常訪問。下面用樣本來介紹如何脫離AppStore來安裝IPA應用。

1 xcode打包ipa(app.ipa)

並上傳到可以公網訪問網路上,例如 http://yourwebsite.com/ipa/app.ipa可以訪問,如果是IIS伺服器,那麼需要配置mime類型支援.ipa下載,否則會提示錯誤。

配置好後,IIS重啟。配置成功再次訪問網址,會提示下載:

2 編寫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>http://yourwebsite.com/ipa/app.ipa</string>                </dict>            </array>            <key>metadata</key>            <dict>                <key>bundle-identifier</key>                <string>com.aruistar.cmcapp</string>                <key>bundle-version</key>                <string>1.0</string>                <key>kind</key>                <string>software</string>                <key>title</key>                <string>cmcapp</string>            </dict>        </dict>    </array></dict></plist>

plist檔案必須放到https服務上,自己沒有架設,可以上傳到github上進行處理。plist中注意<string>http://yourwebsite.com/ipa/app.ipa</string>的配置。

2 建立一個ipainstall.html的頁面,代碼如下:

 1 <!DOCTYPE html> 2 <html > 3 <head> 4     <title>ipa installed on the air</title> 5     <meta charset="UTF-8"> 6     <style type="text/css"> 7     body{ 8         padding: 0; 9         margin: 0;10 11     }12     table13     {14         width: 100%;15         border: solid 1px #999;16         border-collapse:collapse;17     }18     table tr,table td19     {20         21         border: solid 1px #999;22         border-collapse:collapse;23     }24 </style>25 </head>26 <body>27     <div style="font-size:70px; text-align:center; background-color:#999;height:160px;line-height:160px;">28      無線安裝iOS應用29     </div>30     <div style="font-size:60px; text-align:center;">31     <table>32     <tr>33     <td>序號</td>34     <td>應用程式名稱</td>35     <td>備忘</td>36     </tr>37      <tr>38     <td>1</td>39     <td><a  href="itms-services://?action=download-manifest&url=https://raw.githubusercontent.com/yourgithub/iosapp/master/manifest.plist">內部市場化</a></td>40     <td>IOS</td>41     </tr>42     <table>43     </div>44 </body>45 </html>

這裡注意的是,itms-services://?action=download-manifest&url不是預設的github上的網址,必須是原始檔案的地址,一般是raw.githubusercontent.com開頭的。

這個網址,必須用蘋果safari進行訪問才能解析:

 

安裝成功後,開啟app即可操作了:

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.