Javatpoint Logo
Javatpoint Logo

How to Install Swift 4.0.3 on MacOS

Introduction

Swift is a general purpose, compiled and multi paradigm language developed by Apple Inc. for iOS, MacOS, tvOS, Linux, and WatchOS. It was designed to develop applications mainly for iOS and MacOS. Apple introduced Swift in 2014 at Apple's worldwide developers conference.

In this tutorial, we will learn the installation process of Swift 4.0.3 on MacOS.

Prerequisites

  • MacOS
  • Login as root user on terminal

Installation

Following steps are used to install Swift on MacOS.

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.

2) Install Swift

The package file is downloaded in the downloads folder. The file can be installed by the installer command on terminal. Let's see the installation process:

Macos Swift 1

When we finiashed installing Swift 4.0.3 on our MacOS, we just type swift on terminal to check whether its installed properly or not as shown below.

Macos Swift 2

3) Check Swift version

To check, which version of swift is installed on our computer, we have to just type swift -version as shown below.

Macos Swift 3

Well we have installed Swift successfully on MacOS.






Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA