Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.

This article has participated in the “Digitalstar Project” and won a creative gift package to challenge the creative incentive money.

background

As we all know, iPhone apps can only be installed through AppStore, and test packages can only be installed through official tools such as TestFlight. Moreover, there is usually a long review process, and the installation package cannot be updated in time, which is very inconvenient. This paper mainly introduces the front-end implementation of the successful signing of the App directly through the browser download installation, developers can provide timely test App.

process

  • Prerequisite, AppleAppThe signature must be successfuliOSThe application developer is done.
  • Upload it to the server, get the information and the download address, get two files, one isplistFiles andipaFile, andappIcon.
  • By visitingplistFiles to downloadipaFiles and images are used for apple purposessafariBrowser native protocol, use the A tag orwindow.openThe way openplistAddress.
  • Trust the device and install it.
itms-services:/ / /? Action = download-Manifest&URL = an HTTPS address
Copy the code

The following are concrete implementations of several processes

implementation

Upload resources to the server

Company files can be deployed to company servers, and you can test your own files using services such as Github that provide file addresses for free.

  • ipa: The apple to be installedAppPackage files byiOSThe client provides;
  • logo: Picture formatAppIcon;
  • plist:AppDownload the configuration file.


Generated by the clientplistfile

📃 app.plist: Configure or change the following IPA download address, APP icon address, and APP description information on the client.


      <! DOCTYPE plist PUBLIC "- / / / / DTD plist Apple / 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 Download address</string>
        </dict>
        <dict>
          <key>kind</key>
          <string>display-image</string>
          <key>needs-shine</key>
          <true/>
          <key>url</key>
          <string>https://app Icon Address</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 from</string>
        <key>kind</key>
        <string>software</string>
        <key>title</key>
        <string>The name of the APP</string>
        <key>subtitle</key>
        <string>The App description</string>
      </dict>
    </dict>
  </array>
</dict>
</plist>
Copy the code


The download page

📃 install. HTML: provides users with downloaded HTML pages. The styles and functions can be adjusted according to their own requirements.

<! DOCTYPEhtml>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="Width = device - width, initial - scale = 1.0">
</head>
<body>
  <button id="button">download</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>
Copy the code


Implementation effect

Provide the download address to the person who needs it, and click the download button to install the App.

Many distribution platforms in the market, such as Dandelion, do this.

Pay attention to

  • Available only at ApplesafariIn the implementation of download, other browsers can be opened to do some guidance tips.
  • Note that fromios7.1To start,httppushplistIt doesn’t work anymore. It only workshttpsPush, so the address to access this file must behttpsAt the beginning of. You can configure your own server supporthttpsServices, and third-party tools are also available.

Third-party APP hosting download service

We don’t have to go to so much trouble to deploy so many files by ourselves. We can completely use the third-party application internal test distribution platform, which is famous for the following:

  • fir.im: hosting platform for free internal testing of applications,iOSapplicationBeta testingDistribution,AndroidApplication of internal beta distribution
  • The dandelion: free application hosting platform,AppApply crowdtest distribution.
  • Pre.im: APP internal test hosting platform preferred –Beta testing, free application test hosting platform.
  • TestFlight Beta Testing is an apple Beta Testing tool.