Forum | Latest web development tutorials

Swift Tutorial

Swift is a new programming language developed by Apple Inc for iOS and OS X development. Swift adopts the best of C and Objective-C, without the constraints of C compatibility.

Swift uses the same runtime as the existing Obj-C system on Mac OS and iOS, which enables Swift programs to run on many existing iOS 6 and OS X 10.8 platforms.


This tutorial is designed for software programmers who would like to learn the basics of Swift programming language from scratch. This tutorial will give you enough understanding on Swift programming language from where you can take yourself to higher levels of expertise.


Before proceeding with this tutorial, you should have a basic understanding of Computer Programming terminologies and exposure to any programming language.

Execute Swift Online

For most of the examples given in this tutorial, you will find a Try it option, so just use this option to execute your Swift programs on the spot and enjoy your learning.

Try the following example using Try it option available at the top right corner of the following sample code box −

import Cocoa

/* My first program in Swift */
var myString = "Hello, World!"