xctool

安装

$ brew install xctool	

build

build后的包在DerivedData对应的目录里

$ xtool -workspace xxx.xcworkspace -scheme xxx build

archive

archive后的包在Archives对应的目录里

$ xtool -workspace xxx.xcworkspace -scheme xxx archive