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, Apple
App
The signature must be successfuliOS
The application developer is done. - Upload it to the server, get the information and the download address, get two files, one is
plist
Files andipa
File, andapp
Icon. - By visiting
plist
Files to downloadipa
Files and images are used for apple purposessafari
Browser native protocol, use the A tag orwindow.open
The way openplist
Address. - 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 installedApp
Package files byiOS
The client provides;logo
: Picture formatApp
Icon;plist
:App
Download the configuration file.
Generated by the clientplist
file
📃 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 Apple
safari
In the implementation of download, other browsers can be opened to do some guidance tips. - Note that from
ios7.1
To start,http
pushplist
It doesn’t work anymore. It only workshttps
Push, so the address to access this file must behttps
At the beginning of. You can configure your own server supporthttps
Services, 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,
iOS
applicationBeta testing
Distribution,Android
Application of internal beta distribution - The dandelion: free application hosting platform,
App
Apply 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.