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