background: The original company Jenkins packaging after the IPA and apk are through a third-party platform hosting, manually upload, and then go to scan qr code download. Although the third-party platform has a Jenkins plugin to upload directly to the platform, it wants to manage it on its own. So I do the distribution of the installation package. (Android is better to do, as long as there are download links on it, so here only the distribution of iOS) one, store plist files, placed under the domain name of HTTPSthe format of the plist file is as follows:<?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> installation packages </string>
</dict>
</array>
<key>metadata</key>
<dict><key>bundle-identifier</key><string>com.xxx (package name)</string><key>bundle-version</key><string>1.6.0 (version number)</string><key>kind</key>
<string>software</string><key>title</key><string>XX (Installation package name)</string></dict>
</dict>
</array>
</dict></plist>Description:1. Install the package as long as it can be downloaded, do not need to be placed under HTTPS2. The package name is asked to develop, or directly through other software can be found3. The version number must be consistent with the version number in the installation package4. The name of the installation package does not seem to be required, just write the name of your appplist because it does not involve the code, if the company does not have an official CA certificate for the HTTPS server, it can be placed on the code cloud (git.oschina.net), or seven kn. I'm using the git.oschina.net because I can upload it directly with git commands. NOTE: HTTPS servers must have a formal CA certificate. Because Apple makes a restriction, it only recognizes URLs with official CA certificates, otherwise it will prompt for problems such as inaccessible. I built the certificate is not valid, I stepped on this too many pits, but also I set up an HTTPS server = =The method of uploading to git.oschina.net using git commands is detailed at the end. second, the use of Apple installation protocolApple requires Apple's protocol "Itms-services" before the plist file can be downloaded and installed.itms-services://?action=download-manifest&url=https://git.oschina.net/User name/projects name/raw/master/ Xxx.plistCopy the above string into the Safra browser to install, in order to prove that it is feasible, I also cut a ~third, through git to upload the plist file to Git.oschina.net (if plist not on this platform can ignore this step)because it is to do continuous integration, so git upload can not use password interaction, the following is the steps git does not enter a user name and password to upload directly to GitMethod:1. Install git2 above on the machine where Jenkins executes the job2. Generate the key and public key, do not enter the password when generatingssh-keygen-t rsa-c "[email protected]"3. Copy the public key contents into Git's SSH management4. Create a local storage Plist folder, go to initialize git, add SSH remote repositorygit initgit remote add origin [email protected]:xxx/xxx.git5. First pull the remote code locally, and then add the Plist file locally to the Master,push to the remote repositorygit Pullgit add xxxgit commit-m "xxx"git push Origin master Description: Download and merge local branch code from remote repository using fetch and mergewrite this procedure as a shell script as follows#!/bin/bash
RM-RF Pliststore
mkdir Pliststore
CD Pliststore
git init
git remote add origin [email protected]:xxx/xxx.git
git fetch Origin
git merge--no-commit origin/master
CP.. /code/$1./#cp的路径是我存放plist的相对路径, modify it according to your own pathgit add $
git commit-m "$"
git push Origin masterRM-RF PliststoreDescription:1.$1 is a command line argument, because each time the Plist file name is not fixed, you can go through the external parameters passed over2. Create a folder Pliststore is because I do not have to determine the local file and server files are inconsistent, otherwise I will be prompted to merge and the like, I git bad, if you have a good way to exchange a bit ~3. Use this method of not entering the user name password, be sure to push the local first, because the first time you have to enter a git password. I don't need it anymore. Other issues that are not addressed by distribution: because I am the link to the two-dimensional code, using the QR Code scanning Tool can be prompted to install, but with or UC QR code to scan can not install, so need to continue to solve this problem.
iOS for distribution download
iOS for distribution download