Swift is an open-source programming language created by Apple Inc. The language is used, to write programs for iOs, macOs, watchOs, tvOs and Linux. In the near future, the Swift team is also planning to release the language for Windows and Android.

Let’s get started!!

Mac Users:

The mac users can download Xcode free of charge from the app store, which comes with Swift compiler an editor. It is the simplest way to install Swift and all required tools.

Linux Users:

First, you need to install ‘clang’, which is a compiler frontend for the languages of the ‘C’ family.

$ sudo apt-get install clang

Next, you need to set the path of the directory, where the swift executables are.

$ export PATH=/path/to/Swift/usr/bin:"${PATH}"

Last, you can check if the language is set up correctly by typing the following,

$ swift --version

Windows Users:

Unfortunately There is no official Swift compiler and the tools for Windows.

But there are other ways such as, to install ‘Silver’, which is a free implementation of the Swift programming language for Windows operating system. You can download and install it from here, http://www.elementscompiler.com/elements/silver/

Finally, after the installation of swift, a plain text-editor is neededto write the code. I am using the Sublime Text editor, but you can choose anyone. For mac users, fortunately Xcode comes with the compiler and the editor inbuilt.

After the setup is completed, let’s dive into the Swift programming. You can click here for the next tutorial.