Introduction to the Package upgrade feature for iOS apps based on enterprise certificates (similar to fir.im)

Source: Internet
Author: User

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:
  1. <! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
  2. <meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
  3. <title> Business Contacts </title>
  4. <script type= "Text/javascript" >
  5. function OpenURL (URL) {
  6. Window.self.location=url;
  7. }
  8. </script>
  9. <style type= "Text/css" >
  10. Html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,
  11. fieldset,legend,input,button,textarea,select,p,blockquote,th,td,span,frame,iframe {margin:0;padding:0;}

  12. . outbox{margin:0; width:100%; height:1260px;}
  13. . box02 {Margin:auto auto; width:524px; height:81px; text-align:center;}
  14. . button{margin:80px Auto 0 auto; width:458px; height:107px;}
  15. </style>
  16. <body>
  17. <div class= "outbox" style= "border:1px solid #dadfe3;" >
  18. <div class= "box02" style= "margin-top:300px; width:650px; height:81px "><label>
  19. <font style= "font-size:50pt" > Enterprise Contacts </font></label></div>
  20. <div class= "button" style= "WIDTH:666PX; height:152px ">
  21. <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 '); " >
  22. <font style= "font-size:40pt" >ios more than 4.0 online installation </font></label></a><font style= "Font-size: 40pt > </font> </div>
  23. </div>
  24. </body>
Copy CodeCore code:
    1. "OpenURL (' itms-services://?action=download-manifest&url=http://192.168.1.126:8088/netcrm/ucab.plist ');"
Copy Code http://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. Package after compiling

2. Click Distribute
3. Select save for Enterprise or Ad-hoc Deployment, click Next
4. Select Enterprise Certificate for packaging, click Next
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.

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:





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:

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:
    1. NSString *nsstrlocalversion = [[NSBundle mainbundle]objectforinfodictionarykey:@ "cfbundleversion"];
Copy CodeCompare 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:
    1. [[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 Codeexecute the code and open it via the phone-side browserhttp://192.168.1.126:8088/ucab.htmladdress for application installation, you can replace the old version of the application with the new version of the application and complete the application upgrade function. The installation application is consistent with the access path of the ucab.html entered in the phone-side browser.

Introduction to the Package upgrade feature for iOS apps based on enterprise certificates (similar to fir.im)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.