xcode-select -p returns:
/Library/Developer/CommandLineTools
If I run the following script:
#!/bin/zsh
CLTEST="/Library/Developer/CommandLineTools/SDKs"
RED="\033[00;38;5;196m"
# Check if the directory exists
if [[ -d ${CLTEST} ]]; then
# Get the Command Line Tools version and installation date
CLVERSION=$(pkgutil --pkg-info $(pkgutil --pkgs | grep CLTools | head -n 1) | \
awk '/version:/ {print $2}')
CLDATE=$(pkgutil --pkg-info $(pkgutil --pkgs | grep CLTools | head -n 1) | \
awk '/install-time:/ {print $2}')
# Print the version and installation date
printf 'Version: %s\nInstall Date: %s\n' ${CLVERSION:0:6} "$(date -j -r ${CLDATE} +"%F %T")"
else
# Print error message and exit
echo "${RED}CommandLineTools are not installed."
exit 1
fi
exit 0
I get:
Version: 14.3.1
Install Date: 2024-08-27 17:14:36
However, I have no idea if 14.3.1 is the latest version of CLT for Xcode 15.2 as these CLT cannot by downloaded from Apple Developer Resources.
If I then try:
sudo xcode-select -switch /Applications/Xcode.app
followed by:
xcode-select -p
I get:
/Applications/Xcode.app/Contents/Developer
which doesn't help me a lot!
Post
Replies
Boosts
Views
Activity
I had figured out that CLT 15.2 hadn't been released! ChatGPT's answer was insightful:
The latest version of the Command Line Tools (CLT) for Xcode 15.2 available for macOS Ventura is still 15.1. As of now, Apple has not released an updated CLT specifically for Xcode 15.2. This has been confirmed by various users who have noted that even after updating to Xcode 15.2, the Command Line Tools remain at version 15.1(MacRumors Forums). If you require the tools, you can continue using the 15.1 version, which should be compatible with your development needs on macOS Ventura.