今天使用蒲公英給別人發測試 APP(一個遊戲的重簽名包) 的時候被封禁了,在尋找其餘的分發方法的時候順便也探討了下蒲公英的這個 app 分發機制.html
OTA 即 Over-the-Air,是 Apple 在 iOS4 中新加的一項技術,目的是讓開發者可以脫離 Appstore,實現從服務器下載並安裝 iOS 應用。 用戶只須要在 iOS 設備的瀏覽器中,打開itms-services://協議連接,就能夠直接安裝App。(注意:此處的安裝是指,我的帳號須要註冊設備,企業帳號無需註冊設備)git
manifest.plist內容github
<?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>xxx.ipa</string> </dict> <dict> <key>kind</key> <string>display-image</string> <key>url</key> <string>xxx/icon-57.png</string> </dict> <dict> <key>kind</key> <string>full-size-image</string> <key>url</key> <string>xxx/icon-1024.png</string> </dict> </array> <key>metadata</key> <dict> <key>bundle-identifier</key> <string>xxx.xxx.xxx</string> <key>bundle-version</key> <string>1.0.x</string> <key>kind</key> <string>software</string> <key>title</key> <string>xxxx</string> </dict> </dict> </array> </dict> </plist> 複製代碼
字段 | 描述 |
---|---|
software-package | ipa 文件所在地址 |
display-image | 圖標縮略圖 |
full-size-image | 圖標全尺寸 |
bundle-identifier | 包名 com.xxx.xx |
bundle-version | 版本 1.0.x |
title | 應用名 |
靜態 html 頁面 頁面長啥樣不重要,重要的是要有如下代碼瀏覽器
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>標題</title> </head> <body> <a href="itms-services://?action=download-manifest&url=manifest.plist的地址">點擊安裝</a> </body> </html> 複製代碼
若是 ipa 包自己小於100MB 的話,用 gitee 或者 github 也能夠,有能力的能夠本身搭建服務器. 我以騰訊云爲例,新用戶能夠免費領取6個月的對象存儲 COSbash
把咱們以前準備好的文件都傳到服務器上服務器
而後在瀏覽器中訪問 down.html,點擊"點擊安裝"就能夠了 markdown