iOS企业版应用下载页面搭建

简介

iOS应用安装,一般使用蒲公英等第三方站点。

搭建站点安装iOS企业版应用

主要用到了一个.plist文件,该文件记录了.ipa安装包地址、logo地址,identifier版本号、应用名称等信息

html页面中使用a标签即可,href设置成itms-services://?action=download-manifest&url=${plist文件的地址,需要是https://xxx}

需要将下载页面部署到https站点下面

不同版本,.plist文件内容不同,可以在服务器端编写代码生成不同的.plist文件。这里就手动写一个

步骤

  • .ipa安装包上传到https站点下面

  • 新建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>第一处:ipa包地址 https://xxx/xxx/xxx.ipa</string> </dict> <dict> <key>kind</key> <string>display-image</string> <key>url</key> <string>第二处:logo地址 https://xxx/xxx/xxx.57x57@3x.png</string> </dict> <dict> <key>kind</key> <string>full-size-image</string> <key>url</key> <string>第三处:logo地址 https://xxx/xxx/xxx.512x512.png</string> </dict> </array> <key>metadata</key> <dict> <key>bundle-identifier</key> <string>第四处:bundleID com.xxx.xxx</string> <key>bundle-version</key> <string>第五处:bundle版本 1.10.9</string> <key>build</key> <string>第六处:build 11091</string> <key>kind</key> <string>software</string> <key>platform-identifier</key> <string>第七处:platformID com.xxx.xxx</string> <key>title</key> <string>第八处:应用名称</string> </dict> </dict> </array> </dict> </plist>
  • 新建html文件
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>xxx</title> </head> <body> <div> <!-- url后面紧跟的是plist文件地址 --> <a href="itms-services://?action=download-manifest&url=https://xxx/xxx/manifest.plist">iOS下载</a> </div> </body> </html>
  • 将代码放到https站点下访问,就可以下载iOS应用了

创作不易,若本文对你有帮助,欢迎打赏支持作者!

 分享给好友: