1、cd 進入工程目錄
2、執行
xcodebuild -scheme supereye_unicom archive -archivePath /Users/freelancer/Desktop/supereye_unicom.xcarchive
* -scheme: 工程scheme名稱
*-archivePath: 生成.xcarchive檔案的存放目錄
3、導出ipa
xcodebuild -exportArchive -exportFormat ipa \
-archivePath "/Users/freelancer/Desktop/supereye_unicom.xcarchive" \
-exportPath "/Users/freelancer/Desktop/supereye_unicom.ipa" \
-exportProvisioningProfile "supereye"
*-archivePath: .xcarchive檔案絕對路徑
*-exportPath:導出ipa的存放路徑及ipa儲存的檔案名稱
*-exportProvisioningProfile:iOS Provisioning profile檔案名
附:xcodebuild用法參考https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcodebuild.1.html