【IOS】iOS 企業版應用網站下載plist文件


如果想從自己公司的網站上下載安裝應用,首先 准備一個 index.html文件

<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta charset="UTF-8">
    <title>ios-download</title>
    <meta http-equiv="Content-Type" content="text/HTML; charset=utf-8">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
<script type="text/javascript">
function doLocation(url)
{
  var a = document.createElement("a");
  if(!a.click) {
    window.location = url;
    return;
  }
  a.setAttribute("href", url);
  a.style.display = "none";
  document.body.appendChild(a);
  a.click();
}
</script>
  </head>
  <body> 
<script type="text/javascript">
doLocation('itms-services:///?action=download-manifest&url=https://www.test.com/app_version/.plist');
</script>
  </body>
</html>

注意: url 后邊緊跟 plist文件地址,標記紅色的地方

然后新建 .plist 文件,plist中在配置ipa包下載地址以及應用的一些信息。共六處修改。

<?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>第一處:ipa包 服務器地址/*https://down.test.com/ios.ipa*/</string>
                </dict>
                <dict>
                    <key>kind</key>
                    <string>full-size-image</string>
                    <key>needs-shine</key>
                    <true/>
                    <key>url</key>
                    <string>第二處:logo地址:/*https://down.test.com/logo.png*/</string>
                </dict>
                <dict>
                    <key>kind</key>
                    <string>display-image</string>
                    <key>needs-shine</key>
                    <true/>
                    <key>url</key>
                    <string>第三處:logo地址:/*https://down.test.com/logo.png*/</string>
                </dict>
            </array>
            <key>metadata</key>
            <dict>
                <key>bundle-identifier</key>
                <string>第四處:/*bundleID*/</string>
                <key>bundle-version</key>
                <string>第五處:/*version*/</string>
                <key>kind</key>
                <string>software</string>
                <key>subtitle</key>
                <string>install app</string>
                <key>title</key>
                <string>第六處:/*title*/</string>
            </dict>
        </dict>
    </array>
</dict>
</plist>

然后訪問: https://www.test.com/app_version/index.html  就可以下載ios應用了。美滋滋!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM