【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应用了。美滋滋!
欢迎做技术的朋友一起沟通交流!伸手党请绕道,
代码改变世界QQ群:453011886