Since the xcrun binary exists in macOS from the beginning, it can not be used to check that Xcode is available. The xcodebuild command does not return an error if Xcode is available. Reference https://go-review.googlesource.com/c/mobile/+/35852 Change-Id: Ibb6324a2d801eab47b3544c50ee1cdbc36b608bc Reviewed-on: https://go-review.googlesource.com/88755 Reviewed-by: Elias Naur <elias.naur@gmail.com>