1) Download the latest version of Swift: In order to install Swift 4.0. 3 on our MacOS, first we have to download it from its official website https://swift.org/download/ . We download the latest version that will be downloaded as a package file on the computer which can be installed easily by terminal.