简介
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
应用了
发表评论