コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

【Xcode】xcodebuild で使用する Xcode のバージョンを設定する方法

概要

# 現在のバージョンを確認
xcode-select -print-path

# バージョンを設定
xcode-select -switch /Applications/Xcode.app/Contents/Developer

補足

xcode-select: error: --switch must be run as root (e.g. `sudo xcode-select --switch <xcode_folder_path>`).

もし上記のエラーが出力された場合は

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

sudo を付けて実行する