Download Swift

Releases

Swift 3.0.1

Download Date
Xcode 8.1* Toolchain Debugging Symbols
Ubuntu 16.04 Signature
Ubuntu 15.10 Signature
Ubuntu 14.04 Signature

*Swift 3.0 is available as part of Xcode 8.1.

Swift 3.0
Download Date
Xcode 8* Toolchain Debugging Symbols
Ubuntu 15.10 Signature
Ubuntu 14.04 Signature
*Swift 3.0 is available as part of Xcode 8.
Swift 2.2.1
Download Date
Xcode 7.3.1*
Ubuntu 15.10 Signature
Ubuntu 14.04 Signature
*Swift 2.2.1 is available as part of Xcode 7.3.1.
Swift 2.2
Download Date
Xcode 7.3*
Ubuntu 15.10 Signature
Ubuntu 14.04 Signature
*Swift 2.2 is available as part of Xcode 7.3 release.

Previews

Swift 3.0.2 Preview 1

Download Date
Xcode 8.2 beta 2* Toolchain Debugging Symbols
Ubuntu 16.04 Signature

*Swift 3.0.1 GM Candidate is available as part of Xcode 8.2 beta 2.

Older Previews

Swift 3.0 Previews
Swift 3.0 Preview 1
Download Date
Xcode 8.0 beta*
Ubuntu 15.10 Signature
Ubuntu 14.04 Signature
*Swift 3.0 Preview 1 is available as part of Xcode 8.0 beta.
Swift 3.0 Preview 2
Download Date
Xcode 8.0 beta 2*
Ubuntu 15.10 Signature
Ubuntu 14.04 Signature
*Swift 3.0 Preview 2 is available as part of Xcode 8.0 beta 2.
Swift 3.0 Preview 3
Download Date
Xcode 8.0 beta 3* Toolchain Debugging Symbols
Ubuntu 15.10 Signature
Ubuntu 14.04 Signature
*Swift 3.0 Preview 3 is available as part of Xcode 8.0 beta 3.
Swift 3.0 Preview 4
Download Date
Xcode 8.0 beta 4* Toolchain Debugging Symbols
Ubuntu 15.10 Signature
Ubuntu 14.04 Signature
*Swift 3.0 Preview 4 is available as part of Xcode 8.0 beta 4.
Swift 3.0 Preview 5
Download Date
Xcode 8.0 beta 5* Toolchain Debugging Symbols
Ubuntu 15.10 Signature
Ubuntu 14.04 Signature
*Swift 3.0 Preview 5 is available as part of Xcode 8.0 beta 5.
Swift 3.0 Preview 6
Download Date
Xcode 8.0 beta 6* Toolchain Debugging Symbols
Ubuntu 15.10 Signature
Ubuntu 14.04 Signature
*Swift 3.0 Preview 6 is available as part of Xcode 8.0 beta 6.
Swift 3.0 GM Candidate
Download Date
Xcode 8.0 GM Seed* Toolchain Debugging Symbols
Ubuntu 15.10 Signature
Ubuntu 14.04 Signature
*Swift 3.0 GM Candidate is available as part of Xcode 8.0 GM seed.
Swift 3.0.1 Previews
Swift 3.0.1 Preview 1
Download Date
Xcode 8.1 beta* Toolchain Debugging Symbols
Ubuntu 16.04 Signature
Ubuntu 15.10 Signature
Ubuntu 14.04 Signature
*Swift 3.0.1 Preview 1 is available as part of Xcode 8.1 beta.
Swift 3.0.1 Preview 2
Download Date
Xcode 8.1 beta 2* Toolchain Debugging Symbols
Ubuntu 16.04 Signature
Ubuntu 15.10 Signature
Ubuntu 14.04 Signature
*Swift 3.0.1 Preview 2 is available as part of Xcode 8.1 beta 2.
Swift 3.0.1 Preview 3
Download Date
Xcode 8.1 beta 3* Toolchain Debugging Symbols
Ubuntu 16.04 Signature
Ubuntu 15.10 Signature
Ubuntu 14.04 Signature
*Swift 3.0.1 Preview 3 is available as part of Xcode 8.1 beta 3.
Swift 3.0.1 GM Candidate
Download Date
Xcode 8.1 GM Seed* Toolchain Debugging Symbols
Ubuntu 16.04 Signature
Ubuntu 15.10 Signature
Ubuntu 14.04 Signature
*Swift 3.0.1 GM Candidate is available as part of Xcode 8.1 GM Seed.

Snapshots

Trunk Development (master)

Development Snapshots are prebuilt binaries that are automatically created from mainline development branches. These snapshots are not official releases. They have gone through automated unit testing, but they have not gone through the full testing that is performed for official releases.

Download Date
Xcode Debugging Symbols
Ubuntu 16.10 Signature
Ubuntu 16.04 Signature
Ubuntu 15.10 Signature
Ubuntu 14.04 Signature
Older Snapshots Xcode
Download
December 7, 2016 Debugging Symbols
December 1, 2016 Debugging Symbols
November 29, 2016 Debugging Symbols
November 28, 2016 Debugging Symbols
November 15, 2016 Debugging Symbols
November 11, 2016 Debugging Symbols
November 11, 2016 Debugging Symbols
November 9, 2016 Debugging Symbols
November 8, 2016 Debugging Symbols
November 1, 2016 Debugging Symbols
Ubuntu 15.10
Download
October 31, 2016 Signature
October 27, 2016 Signature
October 26, 2016 Signature
October 24, 2016 Signature
October 24, 2016 Signature
October 20, 2016 Signature
October 18, 2016 Signature
October 17, 2016 Signature
October 13, 2016 Signature
October 13, 2016 Signature
Ubuntu 14.04
Download
November 1, 2016 Signature
October 31, 2016 Signature
October 27, 2016 Signature
October 26, 2016 Signature
October 25, 2016 Signature
October 24, 2016 Signature
October 20, 2016 Signature
October 18, 2016 Signature
October 17, 2016 Signature
October 13, 2016 Signature

Older Release Branches

Swift 2.2.x Release Branch Swift 2.2.x Snapshots are prebuilt binaries that are automatically created from `swift-2.2-branch` branches. These snapshots are not official releases. They have gone through automated unit testing, but they have not gone through the full testing that is performed for official releases.
Download Date
Xcode Debugging Symbols
Ubuntu 15.10 Signature
Ubuntu 14.04 Signature
Older Snapshots Xcode
Xcode
April 12, 2016 Debugging Symbols
March 28, 2016 Debugging Symbols
March 1, 2016 Debugging Symbols
February 24, 2016 Debugging Symbols
February 8, 2016 Debugging Symbols
February 3, 2016 Debugging Symbols
January 25, 2016 Debugging Symbols
January 11, 2016 Debugging Symbols
January 6, 2016 Debugging Symbols
December 31, 2015 Debugging Symbols
Ubuntu 15.10
Download
April 12, 2016 Signature
March 28, 2016 Signature
March 1, 2016 Signature
February 24, 2016 Signature
February 8, 2016 Signature
February 3, 2016 Signature
January 25, 2016 Signature
January 11, 2016 Signature
January 6, 2016 Signature
December 31, 2015 Signature
Ubuntu 14.04
Download
April 12, 2016 Signature
March 28, 2016 Signature
March 1, 2016 Signature
February 24, 2016 Signature
February 8, 2016 Signature
February 3, 2016 Signature
January 25, 2016 Signature
January 11, 2016 Signature
January 6, 2016 Signature
December 31, 2015 Signature

Swift is covered by the Swift License at swift.org/LICENSE.txt.

Using Downloads

Apple Platforms

Xcode includes a release of Swift that is supported by Apple. You can try out a version that is still in development by downloading one of the packages above.

To submit to the App Store you must build your app using the version of Swift that comes included within Xcode.

Requirements for Tools

Swift 3.0

Swift 2.2.x

Supported Target Platforms


Installation

  1. Download the latest package release.

  2. Run the package installer, which will install an Xcode toolchain into /Library/Developer/Toolchains/.

    An Xcode toolchain (.xctoolchain) includes a copy of the compiler, lldb, and other related tools needed to provide a cohesive development experience for working in a specific version of Swift.

  3. Open Xcode’s Preferences, navigate to Components > Toolchains, and select the installed Swift toolchain.

  4. Xcode uses the selected toolchain for building Swift code, debugging, and even code completion and syntax coloring. You’ll see a new toolchain indicator in Xcode’s toolbar when Xcode is using a Swift toolchain. Select the Xcode toolchain to go back to Xcode’s built-in tools.

  5. Selecting a Swift toolchain affects the Xcode IDE only. To use the Swift toolchain with command-line tools, use xcrun --toolchain swift and xcodebuild -toolchain swift, or add the Swift toolchain to your path as follows:

$ export PATH=/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:"${PATH}"

Code Signing on macOS

The macOS .pkg files are digitally signed by the developer ID of the Swift open source project to allow verification that they have not been tampered with. All binaries in the package are signed as well.

The Swift toolchain installer on macOS should display a lock icon on the right side of the title bar. Clicking the lock brings up detailed information about the signature. The signature should be produced by Developer ID Installer: Swift Open Source (V9AUD2URP3).

If the lock is not displayed or the signature is not produced by the Swift open source developer ID, do not proceed with the installation. Instead, quit the installer and please email swift-infrastructure@swift.org with as much detail as possible, so that we can investigate the problem.

Linux

Packages for Linux are tar archives including a copy of the Swift compiler, lldb, and related tools. You can install them anywhere as long as the extracted tools are in your PATH.

Note that nothing prevents Swift from being ported to other Linux distributions beyond the ones mentioned below. These are only the distributions where these binaries have been built and tested.

Requirements

Supported Target Platforms


Installation

  1. Install required dependencies:

    $ sudo apt-get install clang libicu-dev
    
  2. Download the latest binary release above.

    The swift-<VERSION>-<PLATFORM>.tar.gz file is the toolchain itself. The .sig file is the digital signature.

  3. If you are downloading Swift packages for the first time, import the PGP keys into your keyring:

    $ gpg --keyserver hkp://pool.sks-keyservers.net \
          --recv-keys \
          '7463 A81A 4B2E EA1B 551F  FBCF D441 C977 412B 37AD' \
          '1BE1 E29A 084C B305 F397  D62A 9F59 7F4D 21A5 6D5F' \
          'A3BA FD35 56A5 9079 C068  94BD 63BC 1CFE 91D3 06C6'
    

    or:

    $ wget -q -O - https://swift.org/keys/all-keys.asc | \
      gpg --import -
    

    Skip this step if you have imported the keys in the past.

  4. Verify the PGP signature.

    The .tar.gz archives for Linux are signed using GnuPG with one of the keys of the Swift open source project. Everyone is strongly encouraged to verify the signatures before using the software.

    First, refresh the keys to download new key revocation certificates, if any are available:

    $ gpg --keyserver hkp://pool.sks-keyservers.net --refresh-keys Swift
    

    Then, use the signature file to verify that the archive is intact:

    $ gpg --verify swift-<VERSION>-<PLATFORM>.tar.gz.sig
    ...
    gpg: Good signature from "Swift Automatic Signing Key #1 <swift-infrastructure@swift.org>"
    

    If gpg fails to verify because you don’t have the public key (gpg: Can't check signature: No public key), please follow the instructions in Active Signing Keys below to import the keys into your keyring.

    You might see a warning:

    gpg: WARNING: This key is not certified with a trusted signature!
    gpg:          There is no indication that the signature belongs to the owner.
    

    This warning means that there is no path in the Web of Trust between this key and you. The warning is harmless as long as you have followed the steps above to retrieve the key from a trusted source.

    If gpg fails to verify and reports “BAD signature”, do not use the downloaded toolchain. Instead, please email swift-infrastructure@swift.org with as much detail as possible, so that we can investigate the problem.

  5. Extract the archive with the following command:

    $ tar xzf swift-<VERSION>-<PLATFORM>.tar.gz
    

    This creates a usr/ directory in the location of the archive.

  6. Add the Swift toolchain to your path as follows:

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

    You can now execute the swift command to run the REPL or build Swift projects.

Active Signing Keys

The Swift project uses one set of keys for snapshot builds, and separate keys for every official release. We are using 4096-bit RSA keys.

The following keys are being used to sign toolchain packages: