[XCUITest] xcodebuild exited with code '65' and signal 'null'

Follow the steps in this video to resolve xcodebuild excited with code 65 error:

https://www.youtube.com/watch?v=TprXEKBnfmA