Issue: You may wish to override the default Xcode Active Developer Directory. However, managed server users may not change the default Xcode active developer directory using the "sudo xcode-select --switch /Applications/" command.

Solution: To override the default Xcode Active Developer Directory, simply set the environment variable "DEVELOPER_DIR" in the Terminal app to the desirable Xcode version.



env DEVELOPER_DIR="/Applications/" /usr/bin/xcodebuild


This will execute xcodebuild using an alternate developer directory (Xcode 7.3.1), rather than the xcodebuild tool that comes with the default Xcode.