From 9c86eafbc87ed8779b2bbe71ed64ccb60eab0bfa Mon Sep 17 00:00:00 2001 From: Tanner Bennett Date: Wed, 5 Feb 2020 09:58:42 -0600 Subject: [PATCH] xcode-select: add page (#3826) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Owen Voke Co-authored-by: Zlatan Vasović --- pages/osx/xcode-select.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/osx/xcode-select.md diff --git a/pages/osx/xcode-select.md b/pages/osx/xcode-select.md new file mode 100644 index 0000000000..5383aa8087 --- /dev/null +++ b/pages/osx/xcode-select.md @@ -0,0 +1,24 @@ +# xcode-select + +> Switch between different versions of Xcode and the included developer tools. +> Also used to update the path to Xcode if it is moved after installation. + +- Install Xcode's command-line tools: + +`xcode-select --install` + +- Select a given path as the active developer directory: + +`xcode-select -s {{path/to/Xcode.app/Contents/Developer}}` + +- Select a given Xcode instance and use its developer directory as the active one: + +`xcode-select -s {{path/to/Xcode.app}}` + +- Print the currently selected developer directory: + +`xcode-select -p` + +- Discard any user-specified developer directory so that it will be found via the default search mechanism: + +`sudo xcode-select -r`