xcodes icon indicating copy to clipboard operation
xcodes copied to clipboard

xcodes select not working in regular terminal

Open jayshah123 opened this issue 2 years ago • 1 comments

Xcodes version used: ➜

~ xcodes version
1.2.0

Unable to select/switch versions on terminal:

Screenshot 2023-08-02 at 6 53 46 PM

As you see in the screenshot, trying to select xcode 14.3 does not work. Is there any reason why?

Also tried below: Screenshot 2023-08-02 at 6 55 56 PM

jayshah123 avatar Aug 02 '23 13:08 jayshah123

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.

cjwirth avatar Oct 02 '24 08:10 cjwirth