I get this error:
xcrun: error: invalid active developer path (/Applications/Xcode.app), missing xcrun at: /Applications/Xcode.app/usr/bin/xcrun
I started getting the same error after i update macOS Mojave to macOS Catalina.
I just installed few command lines in Terminal,
1. $ sudo gem install cocoapods
2. $ sudo xcode-select --install
3. $ chsh -s /bin/zsh
Then,
Xcode -> Preferences -> Locations -> Command Line Tools and confirm you have current Xcode version selected there.
And it works fine with me. Thanks!!
I started getting the same error after updating to OS X El Capitan.
In my case, all I did was to install it:
sudo xcode-select --install
And it works fine for me.
I too had the same issue after upgrading to OS X EI Captian. I just installed xcode-select using sudo xcode-select --install
For me the solution was as easy as reinstalling Xcode.
It was pointed out here: https://superuser.com/a/981126
You can (re)install Xcode via command line like the answer above suggest, or directly from the App Store.
I resolved the issue with the below steps.
Xcode -> Preferences -> Locations -> Command Line Tools -> Select the command tool matching your Xcode version.