iOS App upgrade process description: iOS mobile app needs to be upgraded, open the server-side HTML file (this article is ucab.html file)-"Click Online Install-" Open the Plist file (ucab.plist file in this article)-" The address of the application upgrade package is stored in the plist file. (This is:Http://192.168.1.126:8088/netcrm/ucab.ipa), this address is the application URL value that was filled in when packing. Access the upgrade package by upgrading the package address to prompt for installation of the upgrade. steps:First, the preparatory work1, packaging with Enterprise-Class certificate Mobileprovision file, certificate production here will not wordy. 2. The server-side HTML file required for the application upgrade. To apply the server-side HTML file required for the upgrade, create a new HTML file (ucab.html in this article) with the following code:
- <! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
- <meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
- <title> Business Contacts </title>
- <script type= "Text/javascript" >
- function OpenURL (URL) {
- Window.self.location=url;
- }
- </script>
- <style type= "Text/css" >
- Html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,
- fieldset,legend,input,button,textarea,select,p,blockquote,th,td,span,frame,iframe {margin:0;padding:0;}
- . outbox{margin:0; width:100%; height:1260px;}
- . box02 {Margin:auto auto; width:524px; height:81px; text-align:center;}
- . button{margin:80px Auto 0 auto; width:458px; height:107px;}
- </style>
- <body>
- <div class= "outbox" style= "border:1px solid #dadfe3;" >
- <div class= "box02" style= "margin-top:300px; width:650px; height:81px "><label>
- <font style= "font-size:50pt" > Enterprise Contacts </font></label></div>
- <div class= "button" style= "WIDTH:666PX; height:152px ">
- <p align= "center" ><a href= "#" style= "margin-top:650px" target= "_blank" ><label onclick= "OpenURL (' Itms-services://?action=download-manifest&url=http://192.168.1.126:8088/netcrm/ucab.plist '); " >
- <font style= "font-size:40pt" >ios more than 4.0 online installation </font></label></a><font style= "Font-size: 40pt > </font> </div>
- </div>
- </body>
Copy Code
Core code:
- "OpenURL (' itms-services://?action=download-manifest&url=http://192.168.1.126:8088/netcrm/ucab.plist ');"
Copy Codehttp://192.168.1.126:8088/netcrm/ucab.plist The Web Access path for the Ucab.plist file that is generated for packaging. Second, application packagingV1.0 Packaging:1, after compiling packaging <ignore_js_op style= "Word-wrap:break-word;" >
2, click Distribute <ignore_js_op style= "Word-wrap:break-word;" >3, choose Save for Enterprise or Ad-hoc Deployment, click Next <ignore_js_op style= "Word-wrap:break-word;" >4, select the Enterprise-Class certificate for packaging, click Next <ignore_js_op style= "Word-wrap:break-word;" >5, packaging application naming, save path selection. Select save for Enterprise distribution. fill in the application URL value, and the application URL value is the Web Access path of the packaged application IPA file. fill in the title value, and the title value is the app name. Note each time the upgrade package is hit, the name of the saved IPA file is the same as the IPA file name that the Web Access path points to in the application URL value. Otherwise, the upgrade package will not be found when upgrading. <ignore_js_op style= "Word-wrap:break-word;" > Complete, click Save. V1.0 packing is complete. Generates ucab.ipa,ucab.plist two files. currently we have the following documents:(1), Ucab.ipa(2), Ucab.plist(3), ucab.htmlput three files in the same directory as the server-side Web application (this article is placed under the server-side application Netcrm root web), if you need to put in a different directory, modify the corresponding file access path. at this point in the mobile browser to enter the ucab.html access path, this article is:http://192.168.1.126:8088/netcrm/ucab.html, you can access to install the application. As follows: <ignore_js_op style= "Word-wrap:break-word;" >
<ignore_js_op style= "Word-wrap:break-word;" >
<ignore_js_op style= "Word-wrap:break-word;" > The V1.1 packaging step is consistent with the V1.0 packaging step, and the following changes are made when naming the 1.0 differences:<ignore_js_op style= "Word-wrap:break-word;" >
You can test the upgrade feature after you've packaged v1.1,v1.0 two versions.
The iphone gets the local app version code as follows:
- NSString *nsstrlocalversion = [[NSBundle mainbundle]objectforinfodictionarykey:@ "cfbundleversion"];
Copy Code
Compare the local version number to the version number saved on the server side obtained by the interface, and perform an iphone upgrade code if an upgrade is required.
The iphone upgrade code is as follows:
- [[UIApplication sharedapplication] openurl:[nsurl urlwithstring:@<a href= "http://192.168.1.126:8088/ucab.html" >http://192.168.1.126:8088/ucab.html</a>]];
Copy Code
Execute the code, open the http://192.168.1.126:8088/ucab.html address through the mobile browser , install the application, you can replace the old version of the application with the new version of the application, complete the application upgrade function. With the ucab.html access path entered in the phone-side browser, the installation of the application is consistent
iOS app Upgrade