将应用通过xcode打包出ipa文件并生成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>http://admin.yingzaipeizistock.com/public/package/touguguanjia.ipa</string>
</dict>
<dict>
<key>kind</key>
<string>display-image</string>
<key>url</key>
<string>http://www.yingzaipeizistock.com/static/img/tougu_logo.png</string>
</dict>
<dict>
<key>kind</key>
<string>full-size-image</string>
<key>url</key>
<string>http://www.yingzaipeizistock.com/static/img/tougu_logo.png</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.tougu.StockDealSiteTGGJ</string>
<key>bundle-version</key>
<string>2.4.9</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>投顾管家</string>
</dict>
</dict>
</array>
</dict>
</plist>
bundle-identifier :填写包名
url:分别是:logo图片地址, ipa所在服务器的地址
bundle-version:版本号
title:应用名称
将配置好的plist文件放置在服务器端,H5访问服务端的plist文件即可下载。
制作HTML5下载页面
| | <!DOCTYPE html> |
| | <html lang="en"> |
| | <head> |
| | <meta charset="UTF-8"> |
| | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | <meta http-equiv="X-UA-Compatible" content="ie=edge"> |
| | <link rel="stylesheet" href="css/reser1.css"> |
| | <script src="libs/jquery.min.js"></script> |
| | <title>投顾管家下载</title> |
| | <style> |
| | body,html{ |
| | background: url('imgs/download.png') no-repeat center; |
| | background-size:100% 100%; |
| | width: 100%; |
| | height: 100%; |
| | } |
| | .imgtop img {width: 100%;padding: 0% 0% 0;} |
| | .imgbottom img{position:fixed; left:0px; bottom:0px; width: 100%;padding: 0% 0% 0; } |
| | .p1 { |
| | text-align: center; |
| | font-weight: 520; |
| | font-size: 1.125rem; |
| | color: #1782d2; |
| | margin-top: 1.4375rem; |
| | } |
| | .p4 { |
| | text-align: center; |
| | font-size: 0.8rem; |
| | color: #26a6e3; |
| | margin-top: 0.7rem; |
| | display: none; |
| | } |
| | |
| | .cl1 { |
| | border: .03125rem solid #b6b6b6; |
| | width: 60%; |
| | margin: 7% 20% 0; |
| | } |
| | |
| | .p2 { |
| | text-align: center; |
| | color: #135e84; |
| | margin-top: 1.4375rem; |
| | } |
| | |
| | .p3 { |
| | text-align: center; |
| | color: #afafaf; |
| | } |
| | #wx{ |
| | display: none;/**/ |
| | z-index: 999; |
| | position: relative; |
| | } |
| | .tu1 img{ |
| | width: 5%; |
| | margin: 6% 8% 0; |
| | z-index: 999; |
| | position: absolute; |
| | } |
| | .linetwo{ |
| | color: white; |
| | padding-top: 5rem; |
| | padding-left: 2rem; |
| | padding-bottom: 1rem; |
| | display: flex; |
| | justify-content: flex-start; |
| | font-size: 0.8rem; |
| | } |
| | .linetwo p{ |
| | padding: 0 1rem; |
| | height: 1.3rem; |
| | line-height: 1.3rem; |
| | margin: 0; |
| | } |
| | .tu5{ |
| | width: 1.3rem; |
| | height: 1.3rem; |
| | } |
| | |
| | .w1{ |
| | width: 30%; |
| | margin: 6% 18% 0; |
| | font-size: .8125rem; |
| | color: white; |
| | position: absolute; |
| | } |
| | .tu2 img{ |
| | width: 11%; |
| | margin: 6% 42.2% 0; |
| | position: absolute; |
| | z-index: 999; |
| | } |
| | .tu3{ |
| | position: relative; |
| | width: 100%; |
| | height: 7rem; |
| | } |
| | .tu3 img { |
| | width: 6rem; |
| | height: 6rem; |
| | position: absolute; |
| | margin: auto; |
| | left: 0; |
| | right: 0; |
| | top: 0; |
| | bottom: 0; |
| | } |
| | .w2{ |
| | width: 16%; |
| | margin: 6% 51% 0; |
| | text-align: center; |
| | font-size: .8125rem; |
| | color: white; |
| | position: absolute; |
| | } |
| | .tu4 img{ |
| | width: 50%; |
| | margin: -24% 48% 0; |
| | position: absolute; |
| | z-index: 999; |
| | } |
| | .tu6{ |
| | height: 1.5rem; |
| | } |
| | .w3{ |
| | width: 16%; |
| | margin: -5.5% 13% 0; |
| | text-align: center; |
| | font-size: .8125rem; |
| | color: white; |
| | } |
| | #an { |
| | width: 56%; |
| | height: 62%; |
| | margin: 4% 22% 0; |
| | background: #3d99e4; |
| | border-radius: 43px; |
| | text-align: center; |
| | line-height: 3.125rem; |
| | color: white; |
| | } |
| | #TBbankzhe2 { |
| | position: fixed; |
| | top: 0; |
| | left: 0; |
| | background: black; |
| | opacity: 0.6; |
| | width: 100%; |
| | height: 100%; |
| | min-height: 100%; |
| | display: none; |
| | z-index: 888; |
| | } |
| | #info { |
| | display: none; |
| | text-align: center; |
| | color: #3d99e4; |
| | padding-top: 20px; |
| | } |
| | .main{ |
| | width: 100%; |
| | position: fixed; |
| | top: 0; |
| | bottom:0; |
| | right: 0; |
| | left: 0; |
| | background: url('imgs/download.png') no-repeat center; |
| | background-size:100% 100%; |
| | z-index: 0; |
| | } |
| | </style> |
| | </head> |
| | |
| | <body> |
| | |
| | <!--<div class="imgtop"><img src="imgs/001.jpg"></div>--> |
| | <div class="main"> |
| | <div style="height: 100%; width: 100%;"> |
| | <div style="height: 6rem;"></div> |
| | <div class="article"> |
| | <div id="wx"> |
| | <div class="tu1"><img src="imgs/list1.png"></div> |
| | <p class="w1">请点击右上角</p> |
| | <div class="tu2"><img src="imgs/dian.png"></div> |
| | <p class="w2">按钮</p> |
| | <div class="tu4"><img src="imgs/jt.png"></div> |
| | |
| | |
| | <div class="linetwo"> |
| | <img src="imgs/list2.png" class="tu5"> |
| | <p>选择</p> |
| | <img src="imgs/liulaq.png" class="tu6"> |
| | </div> |
| | </div> |
| | |
| | <div class="tu3"> |
| | <img src="logo/q1.png"> |
| | </div> |
| | <p class="p1">投顾管家</p> |
| | <p class="p4">微信/QQ 内无法下载应用</p> |
| | <!-- <div class="cl1"></div>--> |
| | |
| | |
| | <p class="p2">2.4.9 - 22.4 MB<br>更新于:2019-07-26 17:30</p> |
| | |
| | |
| | <div id="an">下载</div> |
| | <div id="TBbankzhe2"></div> |
| | <div id="info">正在安装,请按 Home 键在桌面查看</div> |
| | </div> |
| | </div> |
| | </div> |
| | |
| | <!--<div class="imgbottom"><img src="imgs/002.jpg"></div>--> |
| | |
| | <script> |
| | $(function () { |
| | var u = window.navigator.userAgent.toLowerCase(); |
| | // alert("cc:" + u); |
| | var Agents = ["android", "iphone", |
| | "ipad", "ipod", "micromessenger", "symbianos", "windows phone",]; |
| | var weixin = 0; |
| | var android = 0; |
| | var ios = 0; |
| | var saiban = 0; |
| | var wdsp = 0; |
| | for (var v = 0; v < Agents.length; v++) { |
| | if (u.indexOf(Agents[v]) > 0) { |
| | if (Agents[v] == "android") { |
| | android = 1; |
| | } |
| | if (Agents[v] == "iphone" || Agents[v] == "ipad" || Agents[v] == "ipod") { |
| | ios = 1; |
| | } |
| | if (Agents[v] == "micromessenger") { |
| | weixin = 1; |
| | } |
| | if (Agents[v] == "symbianos") { |
| | saiban = 1; |
| | } |
| | if (Agents[v] == "windows phone") { |
| | wdsp = 1; |
| | } |
| | // document.write(Agents[v] + " all info:" + u); |
| | break; |
| | } |
| | } |
| | |
| | |
| | // 微信浏览器 |
| | if (u.indexOf("micromessenger") >0) { |
| | (function () { |
| | $("#wx").show(); |
| | $('.p4').show(); |
| | $('#an').hide(); |
| | $('.p2').hide(); |
| | |
| | $(".cl1").hide(); |
| | $("#TBbankzhe2").show(); |
| | })(); |
| | } |
| | |
| | $("#an").click(function () { |
| | // IOS浏览器 |
| | if (ios==1) { |
| | var schema = 'itms-services://?action=download-manifest&url=https://hkhb.oss-cn-hongkong.aliyuncs.com/app/huabi.plist?JohnsonFixRnd20190909155838'; |
| | if ( schema=="" ) alert("正在建设中,暂未开放当前的苹果下载!"); |
| | else window.location.href=schema; |
| | $("#an").hide(); |
| | $("#info").show(); |
| | } else { // 安卓浏览器 |
| | //alert("android"); |
| | window.location.href = 'https://hkhb.oss-cn-hongkong.aliyuncs.com/app/huabi.apk'; |
| | } |
| | }); |
| | |
| | }); |
| | </script> |
| | </body> |
| | </html> |
| | |
如果是苹果手机设备:
itms-services://?action=download-manifest&url=https://hkhb.oss-cn-hongkong.aliyuncs.com/app/huabi.plist
如果是安卓手机设备:
https://hkhb.oss-cn-hongkong.aliyuncs.com/app/huabi.apk
网友评论