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?
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With