Having troubles with Xcode or their Command Line Tools? Follow this guide to reset your Xcode instance on macOS and resolve issues such as "No Xcode or CLT version detected!"
- Alternatively download Xcode directly
xcode-select -print-path
# If the output of the above command is not similar to the following line, Xcode is not installed. Skip to Step 3.
# /Library/Developer/CommandLineTools
# Remove Developer folder
sudo rm -rf $(xcode-select -print-path)
# Remove CommandLineTools folder
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
If the above didn't resolve your issue, you may have a problem with the path Xcode is installed at. Use the following to help if necessary.
# Switch Xcode's path
sudo xcode-select -switch /Library/Developer/CommandLineTools
# Reset Xcode's path
sudo xcode-select --reset