3.cd到待打包项目根目录(即*.xcodeproj所在目录),分别执行如下命令:

a.清除*.app
$xcodebuild clean

b. 生成*.app

$xcodebuild  -sdk iphoneos8.1

c.*.app打包成*.ipa

xcrun -sdk iphoneos8.1 PackageApplication -v "build/Release-iphoneos/TestDistribute.app" -o "/Users/drops/Desktop/TestAppDistribute.ipa" --embed "/Users/drops/Downloads/DropsAppsDistribute.mobileprovision" CODE_SIGN_IDENTITY "iPhone Distribution: XXXXX Technology Co., Ltd./"



注:xcodebuild -showsdks  显示可用的sdk参数,当前为iphoneos8.1
"iPhone Distribution: XXXXX Technology Co., Ltd./" - 为"钥匙串"-> "证书"苹果开发者发布证书的名称串。