必要内容:

1. 生产ipa包时对应的 xxxx.plist . note : 可以自建这个文件,格式正确就行

example:

<?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>http://下载地址/your app.ipa</string>
</dict>
<dict>
<key>kind</key>
<string>display-image</string>
<key>url</key>
<string>https://xxxxx</string>
</dict>
<dict>
<key>kind</key>
<string>full-size-image</string>
<key>url</key>
<string>https://xxxxx</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>appcenter.ms</string>
<key>bundle-version</key>
<string>1.0</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>testApp</string>
</dict>
</dict>
</array>
</dict>
</plist>
 
2. https 服务,免费的也可以.只要浏览器打开了,能正常显示页面就行.
3.  itms-services://?action=download-manifest&url=https://your sever domain/manifast.plist"
4. your app.ipa
 
如何实现:
1、修改xxx.plist 标红的位置,用你自己的下载地址替换 . note: 这个地址局域网不需要https 请求, http就行了. 别直接用你https的默认地址去替换,https 走的443 ,直接用https的域名地址做下载地址,下载不了的(会提醒你无法下载),最好单独在启个http 服务 给个端口 
2、将修改好的xxx.plist 放到你https 服务的根目录下
3、在你https 服务的index 里加个a标签,属性href 填写上面(三)的内容. like 
<a class="download_btn" style="font-size: 45; text-align: center;" href="itms-services://?action=download-manifest&url=https://your https server/xxx.plist">download-host</a>
,url 指向你https服务里的 xxx.plist
4、启动https 服务 ,启动下载地址服务即可
 
 
相关工具推荐:
免费的https 服务 :  Caddy , https://hub.docker.com/_/caddy
http server : node 的http-server 
posted on 2022-03-10 15:53  五十已到  阅读(361)  评论(0)    收藏  举报