xcodebuild和xcrun自动化编译ipa包 笔记
来源:互联网 发布:数据安全保密管理制度 编辑:程序博客网 时间:2024/05/19 22:06
版权声明:本文为博主原创文章,未经博主允许不得转载。
打包过程
xcodebuild负责将工程源文件编译成xxx.app
xcrun负责给xxx.app(签名并)打包成xxx.ipa
第一步清理:xcodebuild clean
第二步编译:xcodebuild
第三步打包:xcrun -sdk iphoneos PackageApplication -v path/To/xxx.app -o xxx.ipa
bash shell入门:
http://www.aka.org.cn/Lectures/002/Lecture-2.1.2/index.html
使用getopts命令使用
:表示有参数需要值
- #!/bin/bash
- while getopts h:ms option
- do
- case "$option" in
- h)
- echo "option:h, value $OPTARG"
- echo "next arg index:$OPTIND";;
- m)
- echo "option:m"
- echo "next arg index:$OPTIND";;
- s)
- echo "option:s"
- echo "next arg index:$OPTIND";;
- \?)
- echo "Usage: args [-h n] [-m] [-s]"
- echo "-h means hours"
- echo "-m means minutes"
- echo "-s means seconds"
- exit 1;;
- esac
- done
在使用getopts命令的时候,shell会自动产生两个变量OPTIND和OPTARG。OPTIND初始值为1,其含义是下一个待处理的参数的索引。只要存在,getopts命令返回true,所以一般getopts命令使用while循环;
在while循环中判断
- if getopts $param_pattern optname ;then
- echo "Error argument value for option $tmp_optname"
- exit 2
- fi
- #判断输入参数是否大与0
- if [ $# -lt 1 ];then
- echo "Error! Should enter the root directory of xcode project after the ipa-build command."
- exit 2
- fi
- #判断第一个参数是否是目录
- if [ ! -d $1 ];then
- echo "Error! The first param must be a directory."
- exit 2
- fi
xcodebuild使用
- sage: xcodebuild [-project <projectname>] [[-target <targetname>]...|-alltargets] [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [<buildsetting>=<value>]... [<buildaction>]...
- xcodebuild -workspace <workspacename> -scheme <schemeName> [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [<buildsetting>=<value>]... [<buildaction>]...
- xcodebuild -version [-sdk [<sdkfullpath>|<sdkname>] [<infoitem>] ]
- xcodebuild -list [[-project <projectname>]|[-workspace <workspacename>]]
- xcodebuild -showsdks
- Options:
- -usage print full usage
- -verbose provide additional status output
- -project NAME build the project NAME
- -target NAME build the target NAME
- -alltargets build all targets
- -workspace NAME build the workspace NAME
- -scheme NAME build the scheme NAME
- -configuration NAME use the build configuration NAME for building each target
- -xcconfig PATH apply the build settings defined in the file at PATH as overrides
- -arch ARCH build each target for the architecture ARCH; this will override architectures defined in the project
- -sdk SDK use SDK as the name or path of the base SDK when building the project
- -parallelizeTargets build independent targets in parallel
- -jobs NUMBER specify the maximum number of concurrent build operations
- -showsdks display a compact list of the installed SDKs
- -list lists the targets and configurations in a project, or the schemes in a workspace
- -find BINARY display the full path to BINARY in the provided SDK
- -version display the version of Xcode; with -sdk will display info about one or all installed SDKs
0 0
- xcodebuild和xcrun自动化编译ipa包
- xcodebuild和xcrun自动化编译ipa包
- xcodebuild和xcrun自动化编译ipa包 笔记
- xcodebuild和xcrun自动化编译ipa包 笔记
- 基于xcodebuild和xcrun的自动化打包
- xcodebuild 与 xcrun 命令行生成ipa
- xcodebuild和xcrun的打包
- Xcodebuild 命令行编译笔记
- xcodebuild和xcrun实现自动打包iOS应用程序
- xcodebuild和xcrun实现自动打包iOS应用程序
- 利用xcodebuild和xcrun给iOS程序自动打包
- xcodebuild和xcrun实现自动打包iOS应用程序
- xcodebuild和xcrun实现自动打包iOS应用程序
- xcodebuild和xcrun实现自动打包iOS应用程序
- iOS项目通过xcodebuild和xcrun自动发布
- xcodebuild和xcrun实现自动打包iOS应用程序
- xcodebuild和xcrun实现自动打包iOS应用程序
- xcodebuild和xcrun实现自动打包iOS应用程序
- Android签名机制之---签名过程详解
- EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)处理
- Oracle使用with as语句提示未明确定义列
- jquery-ui-datepicker组件done
- Spring AOP
- xcodebuild和xcrun自动化编译ipa包 笔记
- C# list.add() list.join()用法
- myeclipse导入工程没有错误之后,tomcat运行也没错误,但是浏览器访问该工程时报错。
- QSS 的选择器
- Selenium 调用IEDriverServer打开IE浏览器
- spring IOC和AOP
- HBase启动后RegionServer自动挂原因及解决办法【ntp】
- AJAX请求和接收数组
- 远程办公的幻想