配置好证书,然后在命令行转到项目目录(GC.xcodeproj)
1.清除
archerminddeMac-mini:GC2.3877 archermind$ xcodebuild clean
2.编译
archerminddeMac-mini:GC2.3877 archermind$ xcodebuild -target GC -configuration Release
xcodebuild -target targetName -configuration Release
Validate build/Release-iphoneos/GC.app
cd /Users/archermind/Desktop/GC2.3877
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/git/bin"
export PRODUCT_TYPE=com.apple.product-type.application
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation /Users/archermind/Desktop/GC2.3877/build/Release-iphoneos/GC.app
** BUILD SUCCEEDED **
3.打包ipa
archerminddeMac-mini:GC2.3877 archermind$ xcrun -sdk iphoneos PackageApplication -v /Users/archermind/Desktop/GC2.3877/build/Release-iphoneos/GC.app -o ~/Desktop/GC2.0.ipa
xcrun -sdk iphoneos PackageApplication -v 源app路径 -o 输出的ipa路径