刚刚进入一家游戏公司,今天在研究iOS利用脚本打包项目工程。用xcode打包速度慢而且繁琐,所以选择脚本来做,在这里分享一下。
打包方法
一.通过Xcode
其实当我们Xcode点击了build或者运行comand+R之后,Xcode自己执行的命令是xcodebuild这条命令.
然后,编译好之后,怎么生产ipa包?
用xcrun命令
二.通过脚本
话不多说,先上手:
打开终端,cd到你的工程位置,然后先试一下xcodebuild命令,
//xcrun
chengpoleness@polen xcodebuild_iPA $ xcrun --version
xcrun version 29.
//xcodebuildchengpoleness@polen ios (develop) $ xcodebuild -version
Xcode 7.1.1
Build version 7D175
执行xcodebuild需要指定你所需要对应的workspace和scheme
在执行$xcodebuild -workspace前,先查看下-list,这个可以知道xcodebuild命令下对应的参数需要填写的内容
chengpoleness@polen ios (develop) $ xcodebuild -list
2016-05-02 15:24:26.656 xcodebuild[16535:154176] [MT]PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug