Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between setting DEVELOPER_DIR and using xcode-select?

Tags:

xcode

Setting the DEVELOPER_DIR variable takes precedence over using xcode-select but I'm curious, what is the difference between the two?

Which should I use if I'm running multiple Xcode versions on the same machine?

like image 495
jan Avatar asked Jul 20 '15 23:07

jan


People also ask

What is Xcode-select in Mac?

You can install the Command Line Tools package by running the xcode-select --install command. Note: macOS comes bundled with xcode-select , a command-line tool that is installed in /usr/bin . It allows you to manage the active developer directory for Xcode and other BSD development tools.

What is Xcode command line tool?

Command-line tools are used by Flutter to build your apps without needing to open Xcode. They are an extra add-on that requires your primary installation of Xcode to be complete: Verify that Xcode has finished downloading and has been installed correctly.

What is DEVELOPER_ DIR?

DEVELOPER_DIR thus allows you to have more precise control over Xcode version on a per-project basis in for example a continous integration setup. E.g. imagine that you would have each project changing version via xcode-select, then if two separate projects builds run concurrently then you would likely have problems.


1 Answers

xcode-select will always take effect system-wide. DEVELOPER_DIR can be used in a per-shell environment. DEVELOPER_DIR thus allows you to have more precise control over Xcode version on a per-project basis in for example a continous integration setup.

E.g. imagine that you would have each project changing version via xcode-select, then if two separate projects builds run concurrently then you would likely have problems. But if you instead setup each project / CI environment to export it's own DEVELOPER_DIR, then concurrent builds won't be an issue.

like image 51
cahlbin Avatar answered Sep 22 '22 12:09

cahlbin