Codecademy will be down from 00:00 to 02:00 ET on November 15, 2019 for scheduled database maintenance. This will affect the website, learning environment, forums, and mobile app. We will provide updates as necessary.

What is Xcode?

Xcode is an IDE (integrated development environment) for macOS containing a suite of software development tools developed by Apple for developing software for iOS, watchOS, macOS, iPadOS, and tvOS.

It was first released in 2003 and the latest stable release is version 11.0 and is available via the Mac App Store free of charge.

Xcode Screenshot

Typically Swift source code files are given the suffix:

  • .swift (ex: hello.swift)

Sometimes it is more convenient to run Swift code in the terminal. Let’s see how we can do it in macOS terminal:

$ swift --version

Compile:

$ swiftc hello.swift

Execute:

./hello

Running Hello World Locally:

Video Tutorials:

  • Downloading Xcode (Mac)
  • Running Hello World via Xcode (Mac)