xcodes select not working in regular terminal
Xcodes version used: ➜
~ xcodes version
1.2.0
Unable to select/switch versions on terminal:
As you see in the screenshot, trying to select xcode 14.3 does not work. Is there any reason why?
Also tried below:
Are you setting the DEVELOPER_DIR environment variable somewhere you your shell startup scripts? That's what broke it for me.
I had this is my .zshrc to make it easier for me to remember how to symbolicate iOS logs:
.zshrc
# Setting up symbolication for iOS logs
# Use:
# 1. Get the location of the symbolicatecrash script
# 2. Export the DEVELOPER_DIR variable
# 3. Put the dSYMs, MyApp.ipa, and x.crash file in the same directory
# 4. Run: symbolicatecrash -v x.crash MyApp.dSYM
export SYMBOLICATE_PATH="$(dirname $(xcode-select -p))/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources"
export PATH="$PATH:$SYMBOLICATE_PATH"
export DEVELOPER_DIR=$(xcode-select --print-path)
So it would never work for me until I opened up another terminal window (or, I guess, reload my .zshrc).
Looking at man xcode-select, it seems like having DEVELOPER_DIR set would mess with whatever is used to change the current Xcode version:
ENVIRONMENT DEVELOPER_DIR Overrides the active developer directory. When DEVELOPER_DIR is set, its value will be used instead of the system-wide active developer directory.
Changing my .zshrc so I wasn't exporting DEVELOPER_DIR made xcodes select work within the same terminal for me.