Enterprise app IPA package deployed to its own server

Time:2020-5-29

preface:
Recently, it has started to march into the pit of uni app mixed development, which has been mined countless, and its strength can be improved a little every time it crosses a pit. Now you need to deploy the enterprise app IPA package to your own server to download.

All IPA packages deploy their own servers and finally have the following four files:
test.ipa , manifest.plist , test.mobileprovision (description document) index.html (download page)

One test.ipa There are many ways to generate packages, such as Xcode packaging, hbuilderx packaging, etc

Two manifest.plist There are also many ways to generate plist files in Zone 8. When Xcode is packaged, plist files will be generated automatically
View plist file configuration:

<?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>https://www.dapeis.com/apps/test.ipa</string>
                </dict>
                <dict>
                    <key>kind</key>
                    <string>display-image</string>
                    <key>url</key>
                    <string>https://www.dapeis.com/apps/icon57.png</string>
                </dict>
                <dict>
                    <key>kind</key>
                    <string>full-size-image</string>
                    <key>url</key>
                    <string>https://www.dapeis.com/apps/icon512.png</string>
                </dict>
            </array>
            <key>metadata</key>
            <dict>
                <key>bundle-identifier</key>
                <string>io.dcloud.dpc</string>
                <key>bundle-version</key>
                <string>1.0.0</string>
                <key>kind</key>
                <string>software</string>
                <key>title</key>
                < string > with wallet < / String >
            </dict>
        </dict>
    </array>
</dict>
</plist>

Three index.html The page address code is as follows:

Enterprise app IPA package deployed to its own server

<template>
  <div class="page tc">
    <div class="header">
      <img class="logo-img">
    </div>
    <h3>Matching wallet</h3>
    <a
      :href="appDwonUrl"
      target="_self"
      class="download-btn"
    >App download and installation</a>
    < div class = "tip" > for apple and Android phones < / div >
    <a v-if="!isAndroid" href=" https://dibaqu.com/guide.html Solutions for "class =" no trusted "> untrusted enterprise developers"</a>
    <! -- IOS certificate trust method -- >
    <a
      v-if="!isAndroid" href="/static/apps/dev/dpcProfile.mobileprovision"
      class="to-believe"
    >Trust developers</a>
    <br>
    <div class="wx-show" v-if="isShowWx">
      <img :src="wxTipUrl" class="wx-show-tip">
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      isShowWx:false , // display wechat prompt
      isAndroid:false , // is it an Android system
      appDwonUrl:'itms-services://?action=download-manifest&url= https://www.dapeis.com/static/apps/dev/manifest.plist , // APP download address
      wxTipUrl:'/static/apps/img/ ios.png '// wechat prompt
    };
  },
  mounted() {
    document.title  ="Matching wallet";
    this.init();
  },
  methods: {
    init() {
      var isWeixin = function() {
        //Determine whether it is wechat
        var ua = navigator.userAgent.toLowerCase();
        return ua.match(/MicroMessenger/i) == "micromessenger";
      };
      if (isWeixin()) {
        console.log("wx");
       this.isShowWx=true;
      }

      // if (navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)) {
      //// determine whether it is IOS
      //   console.log("ios");
      // }
      if (navigator.userAgent.match(/android/i)) {
        this.isAndroid=true;
        this.wxTipUrl='/static/apps/img/android.png';
        this.appDwonUrl='/static/apps/dev/dpcDev.apk';
        //Determine if it's Android
        console.log("android");
      }
    },
    readFile: function(event) {}
  }
};
</script>
<style lang="less">
@import "./appDwonload";
</style>

appDwonload.less file

.page{
    .header {
        position: relative;
        background-image: url(/static/apps/img/bg.jpg);
        height: 130px;
        margin-bottom: 100px;
    }


    .logo-img {
        position: absolute;
        left: 50%;
        bottom: -90px;
        transform: translateX(-50%);
        width: 150px;
        height: 150px;
        border: 1px solid #e5e5e5;
        border-radius: 15px;
        box-shadow: 0 0 10px rgba(0, 0, 0, .2);
    }

    h3 {
        font-size: 20px;
        font-weight: 600;
        margin-top: 10px;
        margin-bottom: 8px;
    }

    .download-btn,
    .to-believe {
        display: inline-block;
        padding: 0 35px;
        line-height: 40px;
        background: #157df1;
        margin: 30px auto 10px;
        color: #fff;
        font-size: 16px;
        border-radius: 5px;
        text-decoration: none;
    }

    .to-believe {
        background-color: #40acf1;
        border: 1px solid #40acf1;
    }

    .no-believe {
        display: block;
        color: #157df1;
        margin-top: 10px;
    }

    .tip {
        color: #999;
        font-size: 16px;
    }

    /*Wechat display*/
    .wx-show {
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background: #666666;
    }

    .wx-show-tip {
        width: 100%;
        max-width: 100%;
        max-height: 100%;
    }
}

Four test.mobileprovision (description file), this file needs to have a developer account to get. How to get it is easy to query by yourself, and you can’t leave a message. The main purpose of this document is to index.html Certificate trust use, with this, you can automatically jump to the mobile phone trust page, without the need for users to query how to trust