Automatically package the file into a. IPA file using the command line-full Guide

Source: Internet
Author: User
Document directory
  • 1. xcode-> preferences
  • 2. Select downloads
  • 3. Set the path
After we develop the project, we need to show the test version to the customer. we need to provide the customer IPA file and install it with 91 assistant. If xcode is used directly, the efficiency is very low. When there is a small change that requires a new package, we need to manually repeat the packaging process. This kind of work can be done by the program writers. Therefore, we should make our own automatic packaging tools based on our actual work conditions. Next, let's take a few steps for the core. We need to use some xcode commands for preparation. Therefore, we must first install command line tools. The installation steps are as follows: 1. xcode-> preferences2. Select downloads. The status is already installed. If you have not installed it, click Install directly. 3. After setting the path, the following problems may occur: xcrun: Error: cocould not stat active xcode path '/volumes/xcode/Xcode44-DP7.app/contents/developer '. (no such
File or directory) This problem occurs because the xcode path is not found in the command line. Run the following statement on the terminal: sudo xcode-select-switch/applications/xcode. APP/contents/logs OK. The preparation is complete. Compile

Xcodebuild clean-workspace XXX. xcworkspace-scheme $ targetname-configuration release

# Compiling static library files

Xcodebuild-workspace XXX. xcworkspace-scheme $ libraryproject-configuration release

# Compile static library source files

Xcodebuild-workspace XXX. xcworkspace-scheme $ resourceproject-configuration release

# Compile the target file of the topic

Xcodebuild-workspace XXX. xcworkspace-scheme $ targetname-configuration release

Package with command line 1. Find the project file with command line. My project file here is paytest. Let's clean the project. Enter the command line: xcodebuild clean. The result is as follows. Clean succeeded, clean successful. Xcodebuild is the same as above. The following describes how to package the file into an IPA file. Here we need to introduce xcrun. This tool is mainly used to package an app file into an IPA package. (Mainly used for jailbroken mobile phones ). The usage is as follows: 1/usr/bin/xcrun-SDK iphoneos packageapplication-V [{target }. APP]-O [{target }. IPA] -- sign [{iPhone distribution: XXX}]-embed [{XXX. mobileprovision}] Where:-V corresponds to the absolute relative path of the app file-O corresponds to the IPA file path and the file name-sign corresponds to the company name or individual name in the publishing Certificate
-Embed corresponds to the certificate publishing file. Note that if the relevant certificate information has been configured in the corresponding distribution configuration,-sign and-embed can ignore the packaging command: xcrun-SDK iphoneos packageapplication-V/users/ZCL/desktop/222/paytest/build/release-iphoneos-O/users/ZCL/desktop/testpay. IPA file obtained by IPA. Finally, use the mobile assistant to install and test. Note that this is just a brief introduction to command line packaging. If you want to use an automatic packaging tool, the core of the job has been completed here. Other tasks only need to be completed with your own project.

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.