When updating brew packages
The following error appears:Error: Your Xcode (8.3.3) is too outdated.
Please update to Xcode 9.0 (or delete it).
Xcode can be updated from
https://developer.apple.com/download/more/
Since I am using the osx beta version
High Sierra
System Version: macOS 10.13
Kernel Version: Darwin 17.0.0
It seems like I need to update the version of Xcode beta (Xcode 9) that I downloaded and installed from the Apple website https://developer.apple.com/xcode/
Now, my question is: how do I switch the Xcode version to my mac so that the brew team uses the recently installed Xcode.
When I start xcodebuild -version, I get the following output (installed from the App Store)
Xcode 8.3.3
Build version 8E3004b
whereas the beta I downloaded from the Apple website directly shows 9.0 beta 6

source
share