- https
- plist
- 安裝協(xié)議
- 注意:mime、下載路徑不能超三級(jí)
https
企業(yè)版分發(fā)的plist糠馆、icon擦盾、ipa下載url必須是https協(xié)議窗怒,所以需要SSL證書或者免費(fèi)的第三方平臺(tái)代管如:七牛、oschina等吏恭。
例如:https://www.example.com/iOS/mainifest.plist
plist
- manifest.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://www.example.com/apps/app_name.ipa</string>
</dict>
<dict>
<key>kind</key>
<string>display-image</string>
<key>url</key>
<string>https://www.example.com/image.57×57.png</string>
</dict>
<dict>
<key>kind</key>
<string>full-size-image</string>
<key>url</key>
<string>https://www.example.com/image.512×512.png</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.domainname.appname</string>
<key>bundle-version</key>
<string>1.0.0</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>app_name</string>
</dict>
</dict>
</array>
</dict>
</plist>
-
manifest.plist圖片顯示:
安裝協(xié)議
itms-services://?action=download-manifest&url=https://www.example.com/apps/download/mainifest.plist
- 直接將此鏈接復(fù)制到Safari或者在App內(nèi)直接openURL:是可以直接安裝的拗小。
- 做一個(gè)html下載頁(yè)面。
- 注:客戶端對(duì)這個(gè)文件會(huì)有緩存樱哼,如安裝不成功哀九。可以將.plist文件改個(gè)名字試試=练T氖!
注意:
mime
在服務(wù)器的配置中需在MIME下添加類型:
l .ipa application/octet-stream
l .plist text/xml下載路徑不能超三級(jí)
l https://www.example.com/apps/download/iOS/mainifest.plist(錯(cuò)誤)
l https://www.example.com/apps/download/mainifest.plist(正確)
各種錯(cuò)誤提示:“無(wú)法連接到…”茄唐,“此時(shí)無(wú)法下載…”息裸,“證書有問題…”,此處有坑請(qǐng)邁過...