(1)清除
xcodebuild clean -project Desktop/XXX/XXX.xcodeproj/ -configuration Release -alltargets
或:
xcodebuild clean -workspace Desktop/XXX/XXX.xcworkspace/ -configuration Release -scheme XXX
(2)構(gòu)建
xcodebuild archive -project XXX.xcodeproj/ -scheme XXX -archivePath /Users/zhang/Desktop/XXX.xcarchive -configuration Release
或:
xcodebuild archive -workspace Desktop/XXX/XXX.xcworkspace/ -scheme XXX -archivePath /Users/zhang/Desktop/XXX.xcarchive -configuration Release
(3)打包
xcodebuild -exportArchive -archivePath Desktop/XXX.xcarchive/ -exportPath Desktop/ -exportOptionsPlist Desktop/agents_packing/enterprise.plist
plist的內(nèi)容:
其中的method可以根據(jù)你要打的包的類型填不同的值, 我的是企業(yè)版的包, 所以是enterprise