xcode-select – 更改默认Xcode
2015-03-12 09:59
197 查看
如果你的电脑中有几个xcode版本,比如一个xcode5.1.1,一个xcode6-beta, 当你打开工程的时候,通常会有一个默认配置,或者使用terminal命令行操作,需要选择使用xcode的不同版本,怎么更改这个配置呢?
请看下文:
It’s not uncommon developers to have multiple versions of Xcode installed. For example, I typically have the latest beta as well as the most current production release installed.
However, there are times when you may want various tools, such as xcodebuild, to point to a specific Xcode folder. To faciliate this, you can use xcode-select.
A common use case is if you use scripts and/or makefiles to build your projects.
Once you set the Xcode folder, xcodebuild will be invoked from the folder you specified.
The command line options are below:
Here is how to print the current Xcode path:
Line number 2 shows the current version of Xcode that is ‘active.’ If you are accessing xcodebuild or other related tools from a script, –print-path is the preferred means to determine the current Xcode location.
Use the -switch option to change to another version of Xcode on your system:
This changes to the Xcode 4.5, Developer Preview 3 on my system. Note that root access is required to set the Xcode location, thus I have used sudo to execute
the command as root.
Printing the path now looks as follows:
To switch back to Xcode installed in the /Applications dir
4000
ectory:
You can read more about xcode-select by view the man page from a terminal:
请看下文:
It’s not uncommon developers to have multiple versions of Xcode installed. For example, I typically have the latest beta as well as the most current production release installed.
However, there are times when you may want various tools, such as xcodebuild, to point to a specific Xcode folder. To faciliate this, you can use xcode-select.
A common use case is if you use scripts and/or makefiles to build your projects.
Once you set the Xcode folder, xcodebuild will be invoked from the folder you specified.
The command line options are below:
xcode-select [-help] xcode-select [-switch xcode_folder_path] xcode-select [-print-path] xcode-select [-version] |
1 2 | ~$ xcode-select --print-path /Developer/Applications/Xcode.app |
Use the -switch option to change to another version of Xcode on your system:
$ sudo xcode-select -switch /Users/JOHN/Downloads/Xcode45-DP3.app |
the command as root.
Printing the path now looks as follows:
1 2 | ~$ xcode-select --print-path /Users/JOHN/Downloads/Xcode45-DP3.app/Contents/Developer |
4000
ectory:
$ sudo xcode-select -switch /Applications/Xcode.app/ |
~$man xcode-select |
相关文章推荐
- xcode-select – 更改默认Xcode
- xcode-select – 更改默认Xcode
- Xcode 更改默认版本 xcode-select
- 更改默认Xcode
- xcode路径引起的问题,使用xcode-select -print-path 显示后再使用Xcode-select -switch更改
- ios 更改xcode 默认的https协议
- select默认选中后更改选项
- 无意中更改 xcode-select 默认值后,opendiff 命令无法调用
- xcode路径引起的问题,使用xcode-select -print-path 显示后再使用Xcode-select -switch更改
- XP/Vista/win2008下更改默认邮件客户端
- 更改MyEclipse默认工作空间
- 如何更改cmd默认路径(多种修改方法)
- 更改开机默认操作系统及等待时间修改
- Bugfree中更改默认的bug列表(buglist)栏位及顺序
- 更改linux默认启动内核加载顺序
- iOS开发-新版Xcode在Appdelegate中通过代码控制跳转,不使用系统默认跳转到默认ViewController
- MyEclipse更改jsp默认编码
- 更改远程桌面终端服务默认端口
- centos:mysql更改密码和设置远程登录,更改默认字符
- windows平台下 wampserver(php集成环境)修改Mysql密码的问题及wampserver更改默认web根目录