Transferred from: http://blog.csdn.net/jerryvon/article/details/38656097
I. Order
Xcodebuild-version Display version number
Xcodebuild-showsdks Show Current SDK
Xcodebuild-list Display project information
Packaging commands
1./usr/bin/xcodebuild-target targetName Clean Cleanup Project
2./usr/bin/xcodebuild-target targetName pack. App
3./USR/BIN/XCRUN-SDK Iphoneos packageapplication-v path/to/xxx.app-o xxx.ipa packaging. IPA
-SDK can specify an emulator or a device
If you want to package adhoc you can execute the following command
XCRUN-SDK Iphoneos packageapplication-v/build/release-iphoneos/xxxx.app-o ~/xxxx.ipa-sign "IPhone distribution:xxx X co.,ltd. "--embed" Xxxx_adhoc.mobileprovision "
Where embed need to mobileprovision, directly from developer provision download a adhoc on the line
Two. Reference
Http://www.cnblogs.com/xiaodao/archive/2012/03/01/2375609.html
Shell Pack iOS Program