iOS Packaging IPA file possible method-using terminal commands and shell scripts

Source: Internet
Author: User

Recently done iOS project to go online, need to play as an IPA package, after trying some methods and finally found a more feasible way!

Packaging steps:

Prerequisites Mobileprovision Profile and developer certificate need to be available, and is distribution, the release version of the

1. Use the Xcodebuild command to package the. App file

Create a Ipatest project,

Open terminal and enter the following command:

(1) CD drag and drop your project folder into the terminal to generate a path, enter

or use the Linux command, LS combined with the CD to complete the directory switch

Go to the corresponding project root directory, the effect is as follows:

(2) Enter Xcodebuild command and execute

Successful compilation will get

* * BUILD SUCCEEDED * *
The Display information!

Open the directory to see

You can see that a build folder has been generated in the root directory, and we can find files that extend to the. App after we enter:


2. Mobile phone installation. app file app (. App is actually our app package, can be installed directly through the tool)

Using Xcode, Menu Window/device can manage apps on your phone, such as:


Click the plus sign in the graph to add our packaged. app file!

This completes, the simplest application installs the process!

3. Use the shell script to add to the Xcode build phrase

Add the following command:

/USR/BIN/XCRUN-SDK iphoneos packageapplication-v "${release_builddir}/${application_name}.app"-O "${BUILD_HISTORY_ Dir}/${application_name}.ipa "--sign" ${developer_name} "--embed" ${provisoning_profile} "
where "{...} App "is the path of the. app file, you can directly change the corresponding path on your computer is also possible;

"{...}. IPA "is the path and name of the. IPA file that is generated!

Add the following method:


Add to here:


The command is as follows:

/USR/BIN/XCRUN-SDK iphoneos packageapplication-v "${release_builddir}/${application_name}.app"-O "${BUILD_HISTORY_ Dir}/${application_name}.ipa "--sign" ${developer_name} "--embed" ${provisoning_profile} "

or use the absolute path of your. app file directly, generate the absolute path to the. IPA (if you have a signature and certificate configured, you can remove--sign and--embed):

/USR/BIN/XCRUN-SDK Iphoneos packageapplication-v/users/yangbin/desktop/testapps/ipapackege/build/ Release-iphoneos/ipapackege.app-o/users/yangbin/desktop/testapps/ipapackege/build/release-iphoneos/ Ipapackege.ipa


Can be obtained, successfully generated the. IPA file

We can upload this. ipa file to a dandelion or FIR application distribution platform, you can scan the phone to download and install!

Original address: Http://blog.csdn.net/yangbingbinga



Possible ways to package IPA files with iOS-using terminal commands and shell scripts

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.