xcode-select refuses to switch

So I'm trying to determine if xcodebuild will allow creating thinned app variants from the command line. Do find out, I'd like to use the Xcode 7 beta 5 version of xcodebuild to see if any now command line swtiches were added. However, xcode-select is refusing to switch to the beta install. Any ideas?


$ xcode-select -p

/Applications/Xcode.app/Contents/Developer

$ sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer

Password:

$ xcode-select -p

/Applications/Xcode.app/Contents/Developer

$ xcode-select -version

xcode-select version 2339.

$ xcodebuild -version

Xcode 6.4

Build version 6E35b

Answered by trickyWicket in 40570022

My issue here was that I was setting the DEVELOPER_DIR environment variable in my ~/.bash_profile like so:


export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer

Removing this and restarting fixed my xcode-select issue. I can now switch to the beta install of Xcode and hit the beta version of xcodebuild.

sudo xcode-select -s /Applications/Xcode-beta.app should do it.

i.e. drop the /Contents/Developer from the command.


Apparently, you may also need to reboot for the change to take effect.


Max.

Thanks for the reply, but no joy.


$ sudo xcode-select -s /Applications/Xcode-beta.app

$ xcode-select -p

/Applications/Xcode.app/Contents/Developer

<reboot>

$ xcode-select -p

/Applications/Xcode.app/Contents/Developer

$ xcodebuild -version

Xcode 6.4

Build version 6E35b

I was able to hit the Xcode 7 version of xcodebuild by manually setting my DEVELOPER_DIR env variable:


export DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer


$ xcodebuild -version

Xcode 7.0

Build version 7A176x



Unfortunatley, I don't see anything about app thinning or slicing or variants in the xcodebuild -help output.

Accepted Answer

My issue here was that I was setting the DEVELOPER_DIR environment variable in my ~/.bash_profile like so:


export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer

Removing this and restarting fixed my xcode-select issue. I can now switch to the beta install of Xcode and hit the beta version of xcodebuild.

xcode-select refuses to switch
 
 
Q