first go to the directory where the project files are located. Like my files. A project is placed in (the directory where the. xcodeproj file resides)/users/xxx/xxx then CE/users/xxx/xxx To this directory The first step is to compile the generated testdemo.xcarchive file first. Xcodebuild-archivepath"testdemo.xcarchive"-project PCAPPLESDKDEMO.XCODEPROJ-SDK Iphoneos-scheme"Pcapplesdkdemo"-configuration"Release adhoc"Archive//the testdemo.xcarchive file directory generated here is the same directory as the. Xcodeproj//-archivepath generated by the. Xcarchive name//-project target file name//target file name for the-scheme projectThe second step is to package the generated testdemo.xcarchive file into an IPA format. Xcodebuild-exportarchive-exportformat Ipa-exportprovisioningprofile"Qingyundeveloper"-archivepath"testdemo.xcarchive"-exportpath"Testdemo.ipa"Show after success* * EXPORT SUCCEEDED * *//at this time the IPA file directory with. Xcodeproj is the same directory//-exportprovisioningprofile This is the certificate of choice for your certificate name is what to fill out here.
Reference: http://minhdanh2002.blogspot.jp/2014/06/archiving-ios-projects-from-command.html