Xcode设置默认版本


1.首先可以在Xcode中可以通过Xcode > Preferences > Locations路径查看到正在使用的版本和该版本路径,如下图


image.png

2.可以通过xcode-select命令进行查看与修改
通过xcode-select -h命令查看可以使用的命令如下:
-h, --help print this help message and exit
-p, --print-path print the path of the active developer directory
-s <path>, --switch <path> set the path for the active developer directory
--install open a dialog for installation of the command line developer tools
-v, --version print the xcode-select version
-r, --reset reset to the default command line tools path


3.各命令详细介绍
(1)查看xcode-select可使用命令

xcode-select -h 
or
xcode-select --help

(2)查看当前正在使用的Xcode版本路径

xcode-select -p 
or
xcode-select --print-path

(3)查看xcode-select版本

xcode-select -v 
or
xcode-select --version

(4)重置为默认的命令行路径

xcode-select -r 
or
xcode-select -reset

(5)修改Xcode使用版本

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer 
or 
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

本文参照:http://blog.sina.com.cn/s/blog_605409770102uwxc.html

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容