The `XCODE_MAJOR_VERSION` should be already set by Xcode while running the script.