IOS development-in house release and installation (ipa re-signature)

Source: Internet
Author: User
Tags key string

In house literally means Internal. in house ipa is an apple application installation package for internal use or testing within the company. As an app developer, before an app is available in the Apple store, you always need to install the installation package on the ios server for testing. At this time, we need to package the ipa in house version, packaging in house is actually a process of re-signing the ipa application. Next we will describe how to release in house. Generally, packaging in house requires the following MAC machines. Generally, packaging ipa is packaged on MAC machines, with the suffix. mobileprovision profile, a certificate with a suffix of P12, and a suffix. cer certificate, and the ipa you want to re-sign. if your P12 certificate already contains a private key, you only need to double-click P12j on the MAC to import the certificate and key into the key string. If the private key is not included, import the private key for P12. On the mac machine, double-click P12 and double-click the key to reverse the key string, select the certificate and private key, and right-click to export the two keys, as shown in) in the dialog box that appears, the storage path and format are displayed. Set the path and select "Personal Information Interchange (. p12) ") in this way, we get a P12 certificate containing a private key, so that we have a certificate in the key string. You can create a folder on the MAC machine and put the configuration file 123. mobileprovision, P12 certificate, cer certificate, and test. ipa creates a ResourceRules in the folder. plist text write the following code <? 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> rules </key> <dict> <key>. * </key> <true/> <key> Info. plist </key> <dict> <key> omit </key> <true/> <key> weight </key> <real> 10 </real> </dict> <key> ResourceRules. plist </key> <dict> <key> omit </key> <true/> <key> weight </key> <real> 100 </real> </dict> <key> ^ SC _Info /. *\. sinf $ </key> <dict> <key> omit </ Key> <true/> <key> weight </key> <integer> 10000 </integer> </dict> <key> ^ SC _Info /. *\. supp $ </key> <dict> <key> omit </key> <true/> <key> weight </key> <integer> 10000 </integer> </dict> </dict> </plist> and name it inhouse in the folder. sh, in inhouse. sh write the following command if! ([-F "$1"]); thenecho \ "$ {1} \" is not a legal file exitfiipaName =$ {1%. ipa} if ["$ ipaName" = "$1"]; thenecho \ "$ {1} \" is not an ipa file exitfiunzip $ {ipaName }. iparm-rf Payload /*. app/_ codesign nature/cp 123. mobileprovision Payload /*. app/embedded. mobileprovision (/usr/bin/codesign-f-s "iPhone Distribution: Ifree studio limited" -- resource-rules Payload /*. app/ResourceRules. plist Payload /*. app/) | {echo failedrm-rf Payload/ Exit} zip-r $ {ipaName} Inhouse. ipa Payload/rm-rf Payload/Ifree studio limited is the name of the certificate in the key string. You can view the name of the key string, and then jump to the folder in the terminal command on the mac machine to execute. /inhouse. sh test. in this way, ipa will be packaged. If you are prompted that you do not have the permission, run the command chmod 777 inhouse. sh is inhouse. sh to add permissions. If an error is reported when the sh command is executed, enter export CODESIGN_ALLOCATE = "/Applications/Xcode in the command. app/Contents/Developer/usr/bin/codesign_allocate "in this way, I get a file named testInhouse. ipa file.

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.