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而去.这样固然没错,就怕那些--.然后今天在视频中看到了这种方法,觉得可能会用到,所以就记录下来了,以备 ...
随机推荐
- 给openvpn客户分配固定ip地址
虽然openvpn提供dhcp服务,但是dhcp是有租约的,到期后会重新分配ip,造成连接中断的问题,所以最好还是给客户端固定一个ip. 思路:开启客户端配置目录,然后为每一个客户建一个配置文件,里面 ...
- About - CONNECT_BY_FILTERING
再次碰到一个诡异的事情,同样的SQL在两个类似数据库中执行时间相差非常之多.直观反应就是执行计划不一样,果不其然. 在跑得很快的环境中的执行计划, 但是在另外一个环境中的执行计划却是, 从执行计划中可 ...
- ny49 开心的小明
开心的小明 时间限制:1000 ms | 内存限制:65535 KB 难度:4 描述 小明今天很开心,家里购置的新房就要领钥匙了,新房里有一间他自己专用的很宽敞的房间.更让他高兴的是,妈妈昨天对他 ...
- Django 自带密码加密,自定密码加密方式 及自定义验证方式
在django1.6中,默认的加密方式是pbkdf_sha256,具体算法不表,一直以来用django的自带用户验证都十分顺手,今天有需求,需要修改默认加密方式为md5,具体方法为: 在setting ...
- spring使用ApplicationContext读取资源文件
@Autowired private ApplicationContext applicationContext; Resource resource = applicationContext.get ...
- java.util.logging.Logger日志生成过程浅析 (转)
http://www.tuicool.com/articles/vy6Zrye ****************************************** java.util.logging ...
- 【转载】LeetCode 题目总结/分类
引自:http://www.douban.com/note/330562764/ 注:此分类仅供大概参考,没有精雕细琢.有不同意见欢迎评论~ 利用堆栈:http://oj.leetcode.com/p ...
- db2 查看进程 db2中的常用命令及使用方法
一 高(重要度) 1 启动一个db 2实例使用: net start instanceName 2 停止一个db 2实例使用: net stop instanceName 3 启动配置助手: db2= ...
- 锁与theadLocal的合并使用
); , TimeUnit.); ){ , TimeUnit.); ){ ); infoPO.setRemainAmount(infoPO.getRemainAmount()-amount); bas ...
- ASP.new GridView获取隐藏列值的几种方法
解决方法: 原文来自:http://www.tzwhx.com/NewShow/newBodyShow/控件_32933.html 作者:lerit 1.隐藏列前获取数据 看这样一个例子(以下均以此 ...