10
头图

background

We all know that the iPhone Apple mobile phone application can only AppStore , and the test package can only be installed through the official TestFlight , and it usually has a long review process and cannot update the installation package in time, which is very inconvenient. This article mainly introduces the front-end implementation to App directly through the browser, and the developer can provide the test App .

Main process

  • The prerequisite, Apple App must be signed successfully, this step is iOS application developer.
  • Upload to the server, get the information and download address, and get two files, one is the plist file and the ipa file, and the app icon.
  • By accessing the plist file to achieve ipa files and pictures, using the Apple safari browser's own protocol, use the a tag or window.open to open the plist address.
  • Trust the device and install it.
itms-services:///?action=download-manifest&url=一个https地址

The following are the specific implementations of several processes

Implementation

Upload resources to the server

Company files can be deployed to the company server, and you can use github and other services that provide free file addresses for your own test files.

  • ipa App package file to be installed, provided by iOS client;
  • logo App icon in image format;
  • plist : App download configuration file.

<br/>

plist file generated by the client

📃 app.plist ipa download address, App icon address and App description information are configured or changed by the client.

<?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://ipa 下载地址</string>
        </dict>
        <dict>
          <key>kind</key>
          <string>display-image</string>
          <key>needs-shine</key>
          <true/>
          <key>url</key>
          <string>https://app 图标地址</string>
        </dict>
      </array>
      <key>metadata</key>
      <dict>
        <key>bundle-identifier</key>
        <string>com.xxxx.xxxx.xxxx</string>
        <key>bundle-version</key>
        <string>0.1.0</string>
        <key>kind</key>
        <string>software</string>
        <key>title</key>
        <string>APP名称</string>
        <key>subtitle</key>
        <string>App描述</string>
      </dict>
    </dict>
  </array>
</dict>
</plist>

<br/>

Download page

📃 install.html : Provide users to download the html page, the specific style and function can be adjusted according to their needs.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
  <button id="button">下载</button>
  <script>
    document.getElementById('button').addEventListener('click', function() {
      window.open('itms-services:///?action=download-manifest&url=https://pan.xchjw.cn/download/app/CorpPrivateInstall.plist', '_self')
    })
  </script>
</body>
</html>

<br/>

Achieve effect

Provide the download address to those who need it, and click the download button to achieve App installation.

Many distribution platforms on the market, such as Dandelion, do just that.

Notice:

  • It can only be downloaded in Apple's safari browser, and it can be opened in other browsers to do some guidance prompts.
  • It should be noted that starting from ios7.1 , http push plist can no longer be used, only use https push, so the address to access this file must start with https You can configure your own server to support https service, or you can use third-party tools.

Other third-party app hosting download services

We don't have to bother to deploy so many files by ourselves. We can use the third-party in-app test distribution platform. The more famous ones are the following:

  • fir.im : Free in-app iOS application beta test distribution, Android application internal test distribution
  • Dandelion : Free application hosting platform, App application public test distribution.
  • Pre.im : The first choice for APP internal testing hosting platform- Beta testing, a free internal testing hosting platform.
  • TestFlight Beta Testing : Apple's official test platform tool.
Article address: https://segmentfault.com/a/1190000040846993 Author: dragonir

dragonir
1.8k 声望3.9k 粉丝

Accepted ✔