A company project with Android and iOS app,android download and installation is very convenient, but iOS some trouble, because the project itself has some limitations, mainly have the following obstacles:
The 1.iOS version is not distributed through AppStore.
2. For security reasons, Android and iOS apps can only access the server via VPN, and the Internet is inaccessible after the phone has been VPN. Therefore, you cannot access Internet-related HTTPS services, in other words, Web services that cannot use the Internet's SSL certificates.
3, iOS version is greater than 7.1, so Apple's itms-services protocol must be practical HTTPS.
In view of these obstacles, so consider the LAN to build internal HTTPS services, through the OTA (over-the-air) way to distribute iOS applications.
Ota
Ota, over-the-air, is simply a wireless way to send instructions to devices, specifically for iOS devices, such as the iphone, ipad, etc., so that developers can get out of the AppStore to download and install iOS apps from their own servers. Users only need to open a link in the browser of the iphone or ipad to install the app directly in the main interface. The entire distribution process consists of three parts: the device (IPHONE,IPAD), the server (Profile service, which is used to send the configuration file), and the authentication server (including the CA and directory server).
How OTA distribution is implemented
For iOS app distribution, you need to include three files on your server for OTA distribution
<a href= "Itms-services://?action=download-manifest&url=https://192.168.0.1/appipa.plist" >Install App </a>
With the above three files, the Apple device can download and install by providing an HTTPS server that reads the path of the plist file's iOS-installed IPA file.
Self-built OpenSSL certificate
Because the service that provides HTTPS can only be inside the LAN, the SSL certificate cannot be issued by the relevant CA authority, and the certificate is not domain-based and IP-based, so only self-made certificates can be used. Here I am using OpenSSL to configure Tomcat's SSL certificate, and OpenSSL uses Openssl.exe generation under the Windows version of the Apache server. The steps are as follows (using the command line):
1. Generate the private key of the server
OpenSSL genrsa-out Server.key 1024
2. Generate a signing request (Common name must be the IP or domain name of the server)
OpenSSL req-new-out Server.csr-key server.key-config. \conf\openssl.cnf
3. Generate the CA private key
OpenSSL genrsa-out Ca.key 1024
4. Generate the CA's self-signed certificate with the CA's private key
OpenSSL req-new-x509-days 3650-key ca.key-out ca.crt-config. \conf\openssl.cnf
5. Create the Democa (Bin directory)
Democa inside Create file Index.txt and serial,serial content for 01,index.txt is empty, and folder Newcerts
6. Generate a Web server signing certificate
OpenSSL ca-in server.csr-out server.crt-cert ca.crt-keyfile ca.key-config. \conf\openssl.cnf
Finally, the generated server.crt and Server.key paths are configured in the Apache server's openssl.cnf configuration file (see the relevant documentation for specific configuration) and the Apache server can be restarted.
Sslcertificatefile "/APACHE22/CONF/SSL2RVER.CRT"
Sslcertificatekeyfile "/apache22/conf/ssl2rver.key"
Client certificate CA.CRT can be downloaded or emailed to iOS devices, but one thing to note: Since this is a self-signed SSL certificate and is untrusted, you need to manually set up a trust certificate on your iphone or ipad.
After installing the client certificate, you can access the page that provides the Itms-services protocol link via the iphone or ipad browser, and download and install the iOS app.
-----------------------------------------------------------------------------------------------------------
Please pay attention to my website and the public number, the article will be posted on my website and the public number.
This article starting link: https://www.watch-life.net/website-app/ota-ios-app.html
My site: Watch Xuan
Public number name: Watch Xuan
Public number:Iwatchlife
You can also scan or long press the following two-D code
Distribute iOS apps over the LAN via OTA