Xcode設(shè)置默認(rèn)版本


1.首先可以在Xcode中可以通過(guò)Xcode > Preferences > Locations路徑查看到正在使用的版本和該版本路徑,如下圖


image.png

2.可以通過(guò)xcode-select命令進(jìn)行查看與修改
通過(guò)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.各命令詳細(xì)介紹
(1)查看xcode-select可使用命令

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

(2)查看當(dāng)前正在使用的Xcode版本路徑

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

(3)查看xcode-select版本

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

(4)重置為默認(rèn)的命令行路徑

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

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容