IOS 命令行编译
转自:简书
IOS 命令行编译
发表于 IOS2013-08-17 07:07 字数: 583 阅读量: 61
This document will note about the ios command build steps.
Step1: Sync code
You can use git svn or other vc tools sync you code to local disk. Then change the current dir to project dir that exist example.xcodeproj file.
Step2: Update project version
first you can use command:
$ agvtool what-version
if the output have a number this step can be skiped.
if the output have no number user follow commamd update project version
$ agvtool new-marketing-version 1.2
$ agvtool new-version -all 1.2
Step3: Unlock keychian
You can use follow command do this step
security list-keychains -s ~/Library/Keychains/login.keychain
security default-keychain -d user -s ~/Library/Keychains/login.keychain
security unlock-keychain -p password ~/Library/Keychains/login.keychain
If you undo this step, you next step maybe failed.
Step4: Build IOS Project
We will use commad xcodebuild build the ios project.
You can use follow command get help for this command
$ xcodebuild -h
Usage: xcodebuild [-project <projectname>] [[-target <targetname>]...|-alltargets] [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [-showBuildSettings] [<buildsetting>=<value>]... [<buildaction>]...
xcodebuild [-project <projectname>] -scheme <schemeName> [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [-showBuildSettings] [<buildsetting>=<value>]... [<buildaction>]...
xcodebuild -workspace <workspacename> -scheme <schemeName> [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [-showBuildSettings] [<buildsetting>=<value>]... [<buildaction>]...
xcodebuild -version [-sdk [<sdkfullpath>|<sdkname>] [<infoitem>] ]
xcodebuild -list [[-project <projectname>]|[-workspace <workspacename>]]
xcodebuild -showsdks
Options:
-usage print brief usage
-help print complete usage
-verbose provide additional status output
-license Show License agreement!
-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
-toolchain NAME use the toolchain with identifier or name NAME
-parallelizeTargets build independent targets in parallel
-jobs NUMBER specify the maximum number of concurrent build operations
-dry-run do everything except actually running the commands
-showsdks display a compact list of the installed SDKs
-showBuildSettings display a list of build settings and values
-list lists the targets and configurations in a project, or the schemes in a workspace
-find-executable NAME display the full path to executable NAME in the provided SDK and toolchain
-find-library NAME display the full path to library NAME in the provided SDK and toolchain
-version display the version of Xcode; with -sdk will display info about one or all installed SDKs
Show current xcodebuild version
$ xcodebuild -version
Xcode 4.5.2
Build version 4G2008a
Show current SDK
$ xcodebuild -showsdks
OS X SDKs:
Mac OS X 10.7 -sdk macosx10.7
OS X 10.8 -sdk macosx10.8
iOS SDKs:
iOS 6.0 -sdk iphoneos6.0
iOS Simulator SDKs:
Simulator - iOS 6.0 -sdk iphonesimulator6.0
Show project information in project folder
$ xcodebuild -list
Build project via iOS 6.0 sdks
$ xcodebuild -sdk iphoneos6.0
or command
$ xcodebuild clean -sdk iphoneos6.0 -configuration Release
Step5: Generate ipa file
This step will generate the ipa file.
Will use follow command to finish this step:
$ xcrun -sdk iphoneos6.0 PackageApplication -v your/target/app/path.app -o your/output/path.ipa --embed your/mobileprovision/file/path
IOS 命令行编译的更多相关文章
- iOS系统提供开发环境下命令行编译工具:xcodebuild
iOS系统提供开发环境下命令行编译工具:xcodebuild[3] xcodebuild 在介绍xcodebuild之前,需要先弄清楚一些在XCode环境下的一些概念[4]: Workspace:简单 ...
- xcode命令行编译时:codesign命令,抛出“User interaction is not allowed.”异常 的处理
之前正常运行的hudson iOS编译服务器slave节点,忽然出现编译失败.发现原因有2个: 第一个原因是编译机上用来签名的用户帐号过期,第二个原因是操作系统和xCode升级造成的. 对于第一个,重 ...
- 基于命令行编译打包phonegap for android应用 分类: Android Phonegap 2015-05-10 10:33 73人阅读 评论(0) 收藏
也许你习惯了使用Eclipse编译和打包Android应用.不过,对于使用html5+js开发的phonegap应用,本文建议你抛弃Eclipse,改为使用命令行模式,绝对的快速和方便. 一直以来,E ...
- 用命令行编译java并生成可执行的jar包
用命令行编译java并生成可执行的jar包 1.编写源代码. 编写源文件:CardLayoutDemo.java并保存,例如:I:\myApp\CardLayoutDemo.java.程序结构如下: ...
- namke 命令行编译
简介 大家已经习惯于微软提供的功能强大的IDE,已经很少考虑手动编连项目了,所谓技多不压身,有空的时候还是随我一块了解一下命令行编译. C/C++/VC++程序员或有Unix/Linux编程经验应该很 ...
- 命令行编译运行Java
首先要安装JDK,然后设置环境变量Path,添加C:\Program Files (x86)\Java\jdk1.8.0_66\bin 然后建立一个名为j.java的文件,里面加入如下代码: publ ...
- VS2010命令行编译C#和VC项目
VS2010命令行编译C#和VC项目 VS2010命令行编译C#和VC项目 根据需要动态创建数据库字段后,需要动态创建或者调整页面,那就需要编译这些页面和后台文件.因此使用命令行编译将会非常方便,对于 ...
- Android 命令行编译、打包生成apk文件
一.搭建搭建环境 1. 安装JDK 和 Android SDK 2. 配置环境变量 D:\android-sdk-windows\tools C:\Program Files\Java\jdk1. ...
- 韩顺平细说Servlet视频系列意外收获之用命令行编译带有包的java类解决方案
命令行编译带有包的java类 在命令行编译这一块,基本上都是新手入门时了解一下,然后就直奔IDE而去.这样固然没错,就怕那些--.然后今天在视频中看到了这种方法,觉得可能会用到,所以就记录下来了,以备 ...
随机推荐
- Ruby的DevKit名词解释
为了加快运行速度,Ruby下好多扩展包都是用C语言写的二进制包,如果我们要安装就要重新编译,DevKit包主要就是将编译用的工具链打包,解决了众多依赖问题,方便了群众. 但是,在实际安装中,可能还会遇 ...
- c语言中使用宏,需要注意的的几点
使用#define来定义一些宏,进行一些简洁的替换甚至一些带参数的宏,在linux c代码中很常见,说明它很好.很有用, 但是它也有一些复杂的规矩和陷阱需要注意,下面我记录一些,仅供参考. 1.当使用 ...
- 【Android】3.5 示例5--多地图展示
分类:C#.Android.VS2015.百度地图应用: 创建日期:2016-02-04 3.5 示例5--多地图展示 一.简介 地图控件自v2.3.5版本起,支持多实例,即开发者可以在一个页面中建立 ...
- jvm 性能调优 经验总结---转
最近因项目存在内存泄漏,故进行大规模的JVM性能调优 , 现把经验做一记录. 一.JVM内存模型及垃圾收集算法 1.根据Java虚拟机规范,JVM将内存划分为: New(年轻代) Tenured(年老 ...
- 简单了解一下c编译过程
大一的时候,学习c语言,用的是VC6.0.用了1年多,到后来了解了Linux,知道了gcc编译器,开始使用gcc Hello.c -o a.out 这样的命令进行编译.后来又学了gcc的一些其他的命令 ...
- Oracle SQLDeveloper ORA-01017 invalid username/password;logon denied (密码丢失解决方案)
oracle sys账号用sql developer工具无法登陆 用户名和密码不一致 如果的确是丢失密码的话:在SQL*Plus中执行如下命令: SQL>conn/as sysdba (操作 ...
- Python 里 and、or 的计算规则
引子: >>> print '' or 5 or 05>>> print 5 and 44>>> print '' or 5 or 0 and 4 ...
- Filter method example
The Scala List class filter method implicitly loops over the List/Seq you supply, tests each element ...
- Spark: Best practice for retrieving big data from RDD to local machine
've got big RDD(1gb) in yarn cluster. On local machine, which use this cluster I have only 512 mb. I ...
- Celery+python+redis异步执行定时任务
我之前的一篇文章中写了[Celery+django+redis异步执行任务] 博文:http://blog.csdn.net/apple9005/article/details/54236212 你会 ...