Skip to content

Installation

Swift is available on multiple platforms, with the best experience on Apple devices.

The standard way to develop Swift apps on a Mac is by using Xcode.

  1. Open the App Store on your Mac.
  2. Search for Xcode and click Install.
  3. Once installed, open Xcode and follow the prompts to install additional components.

Alternatively, you can install just the Swift command-line tools using Terminal:

shell
xcode-select --install

iPad

For learning Swift on the go, Apple provides Swift Playgrounds.

  1. Open the App Store on your iPad.
  2. Search for Swift Playgrounds and download it.
  3. You can start with "Swift Explorations" or create a new "App" or "Playground" file.

Windows & Linux

Swift is also supported on Windows and various Linux distributions (Ubuntu, Amazon Linux, etc.).

  1. Visit the Swift.org Download Page.
  2. Follow the specific instructions for your operating system.
  3. For Windows, you'll typically need to install Visual Studio 2022 with the "Desktop development with C++" workload first.

VS Code Integration

If you are not using Xcode, Visual Studio Code is the recommended editor.

  • Install the official Swift extension by the Swift team for syntax highlighting and build support.

Verifying Installation

Open your terminal (or Command Prompt) and type:

bash
swift --version

If correctly installed, you should see the version information (e.g., swift-driver version: 1.x.x Apple Swift version 6.x).