ios-self-built webpage install ipa package in the browser


title: ios-self-built webpage Install the ipa package in the browser
categories: Ios
tags: [ios, ipa]
date: 2021-03-17 19:22:45
comments: false
mathjax: true
toc: true

ios-self-built webpage install ipa package in the browser


Prequel

  • IOS system installs ipa file in Safari-https://www.cnblogs.com/nnnnnn/p/11102017.html

In the development mode, the typed ipa installation test can be directly connected to the real machine to run, or a third-party hosting ipa service, such as fir , but it seems to require real-name authentication, which is troublesome.

so, build a file download service by yourself.


Precondition

  1. The uuid of the device that downloaded the ipa package has been added to the Apple test device list
  2. Web service, file service.

Build file service

  1. Start a file service, here is tomcat as an example

  2. Add MIME configuration, add in conf/web.xml for tomcat

    <mime-mapping>
        <extension>mobileprovision</extension>
        <mime-type>application/octet-stream</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>plist</extension>
        <mime-type>application/XML</mime-type>
    </mime-mapping>
    
  3. Create a new plist file, such as: rummy.plist

    This file and ipa are lost to the file service

    <?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://aaa.bbb.cn:32443/dl/rummy.ipa</string>
    				</dict>
    			</array>
    			<key>metadata</key>
    			<dict>
    				<key>bundle-identifier</key>
    				<string>com.aaa.bbb</string>
    				<key>kind</key>
    				<string>software</string>
    				<key>title</key>
    				<string>rummy-ios.ipa</string>
    			</dict>
    		</dict>
    	</array>
    </dict>
    </plist>
    
    • url: the address where ipa can be downloaded
    • title: A pop-up prompt when downloading.
    • Other value values ​​are filled in at will, no accurate information is required
  4. Create a new html file, such as: index.html

    This page is missing web service

    <!DOCTYPE html>
    <html>
     <head> 
      <title>iOS</title> 
      <style type="text/css">
    .wp {
           
           
        display: flex;
        justify-content: center;
        align-items: center;
    }
    	</style> 
     </head> 
     <body> 
      <div class="wp"> 
       <div class="box"> 
        <a href="itms-services://?action=download-manifest&amp;url=https://aaa.bbb.cn:32443/dl/rummy.plist" class="button"> <font size="20">Install APP</font> </a> 
       </div> 
      </div>  
     </body>
    </html>
    
    • url: The address that can be downloaded to the plist file just created
  5. done. Test, open web service: https://aaa.bbb.cn:32443/


Guess you like

Origin blog.csdn.net/yangxuan0261/article/details/114967194