IOS命令行编译
来源:互联网 发布:公司网络限制 编辑:程序博客网 时间:2024/05/29 03:27
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.keychainsecurity default-keychain -d user -s ~/Library/Keychains/login.keychainsecurity 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 -hUsage: 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 -showsdksOptions:-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 -versionXcode 4.5.2Build version 4G2008a
Show current SDK
$ xcodebuild -showsdksOS X SDKs: Mac OS X 10.7 -sdk macosx10.7 OS X 10.8 -sdk macosx10.8iOS SDKs: iOS 6.0 -sdk iphoneos6.0iOS 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
0 0
- IOS命令行编译
- ios 命令行下编译
- 命令行编译/安装/运行/卸载IOS APP
- 命令行编译/安装/运行iOS App
- xcodebuild命令行编译打包iOS应用和企业发布
- ios ffmpeg编译支持命令行的静态库文件
- 命令行编译Solution
- 命令行执行编译
- EVC命令行编译
- 命令行编译Solution
- CUDA文件编译命令行
- 命令行编译vc工程
- 在命令行编译servlet
- WTL 命令行编译
- wince 6.0 命令行编译
- 命令行编译c#
- Symbian 命令行编译、打包
- WinCE命令行编译
- MAC上类apt-get工具brew的安装与使用
- 随机产生20个[10,100]的正整数,输出这些以及他们中的最大数
- Postgresql常用SQL语句
- JAVA排序之木桶排序 和 冒泡排序
- HighCharts柱状图设置渐变色
- IOS命令行编译
- 名校神题
- ormlite 中的onUpgrade
- 自己的底层代码库(十八)——一些工具函数代码
- VSFTP配置虚拟用户
- openstack安装笔记
- MARK
- android自定义底部Tab,项目整体界面框架
- ios学习之 生成随机验证码