1. 程式人生 > ios教程 > iOS 7.1下itms-services線上安裝失敗的解決方法

iOS 7.1下itms-services線上安裝失敗的解決方法

iOS 7.1正式版釋出了,之前使用itms-services://URL方式線上安裝ipa檔案的方法卻失效了,點選的時候報錯為:“無法安裝應用程式,因xxx.com的證書無效”(錯誤介面見下圖),這應該怎麼解決呢?

其實iOS 7.1修改了manifest.plist檔案的訪問協議,之前可以通過http協議訪問,在iOS 7.1之後必須使用https協議方式訪問。

<a href="http://blog.sqstudio.com/wp-content/uploads/2014/03/ios7.1_https.jpg" class="highslide-image cboxElement" rel="example4" 955"="" style="text-decoration: none; color: rgb(1, 150, 227); cursor: url(http://blog.sqstudio.com/wp-content/plugins/auto-highslide/highslide/graphics/zoomin.cur), pointer; outline: none;">iOS 7.1下itms-services線上安裝失敗的解決方法_IOS

 

 

 

比如之前的連結程式碼為:

itms-services://?action=download-manifest&;url=http://example.com/manifest.plist

在iOS 7.1之後,就需要修改為:

itms-services://?action=download-manifest&;url=https://example.com/manifest.plist

需要一個SSL證書才能夠實現線上安裝ipa檔案的功能。

 

//-------------------  延伸: 關於https設定 ----------------------------------

1.upload your app.plist to dropbox

2.get shared link of app.plist, like https://www.dropbox.com/s/qgknrfngaxazm38/app.plist

3.replace www.dropbox.com with dl.dropboxusercontent.com in the link, like https://dl.dropboxusercontent.com/s/qgknrfngaxazm38/app.plist

4.write your download.html like <a href="itms-services://?action=download-manifest&;url=https://dl.dropboxusercontent.com/s/qgknrfngaxazm38/app.plist">INSTALL!!</a>

5.upload the download.html to dropbox

6.get shared link of download.html, like https://www.dropbox.com/s/gnoctp7n9g0l3hx/download.html

7.replace www.dropbox.com with dl.dropboxusercontent.com in the second link as well, like https://dl.dropboxusercontent.com/s/gnoctp7n9g0l3hx/download.html

Now, visit https://dl.dropboxusercontent.com/s/gnoctp7n9g0l3hx/download.html in your device, you can install the app like before.

 

這個是通過上傳dropbox來解決,事實上,只要找個可以以https方式共享外鏈的網盤,把plist檔案上傳就可以了!