Download Swift
Releases
Swift 5.2.4
Date: May 20, 2020
Tag: swift-5.2.4-RELEASE
*Swift 5.2.4 is available as part of Xcode 11.5.
Swift 5.x
Swift 5.2.3
Date: April 29, 2020Tag: swift-5.2.3-RELEASE
| Platform | Toolchain | Docker Tag |
|---|---|---|
| Xcode 11.4.1* | Toolchain Debugging Symbols | Unavailable |
| Ubuntu 18.04 | Toolchain PGP Signature | 5.2.3-bionic |
| Ubuntu 16.04 | Toolchain PGP Signature | 5.2.3-xenial |
Swift 5.2.2
Date: April 15, 2020Tag: swift-5.2.2-RELEASE
| Platform | Toolchain | Docker Tag |
|---|---|---|
| Xcode 11.4.1* | Toolchain Debugging Symbols | Unavailable |
| Ubuntu 18.04 | Toolchain PGP Signature | 5.2.2-bionic |
| Ubuntu 16.04 | Toolchain PGP Signature | 5.2.2-xenial |
Swift 5.2.1
Date: March 30, 2020Tag: swift-5.2.1-RELEASE
| Platform | Toolchain | Docker Tag |
|---|---|---|
| Xcode 11.4* | Toolchain Debugging Symbols | Unavailable |
| Ubuntu 18.04 | Toolchain PGP Signature | 5.2.1-bionic |
| Ubuntu 16.04 | Toolchain PGP Signature | 5.2.1-xenial |
Swift 5.2
Date: March 24, 2020Tag: swift-5.2-RELEASE
| Platform | Toolchain | Docker Tag |
|---|---|---|
| Xcode 11.4* | Toolchain Debugging Symbols | Unavailable |
| Ubuntu 18.04 | Toolchain PGP Signature | 5.2-bionic |
| Ubuntu 16.04 | Toolchain PGP Signature | 5.2-xenial |
Swift 5.1.5
Date: March 9, 2020Tag: swift-5.1.5-RELEASE
| Platform | Toolchain | Docker Tag |
|---|---|---|
| Xcode 11.3* | Toolchain Debugging Symbols | Unavailable |
| Ubuntu 18.04 | Toolchain PGP Signature | 5.1.5-bionic |
| Ubuntu 16.04 | Toolchain PGP Signature | 5.1.5-xenial |
| Ubuntu 14.04 | Toolchain PGP Signature | Unavailable |
Swift 5.1.4
Date: January 31, 2020Tag: swift-5.1.4-RELEASE
| Platform | Toolchain | Docker Tag |
|---|---|---|
| Xcode 11.3* | Toolchain Debugging Symbols | Unavailable |
| Ubuntu 18.04 | Toolchain PGP Signature | 5.1.4-bionic |
| Ubuntu 16.04 | Toolchain PGP Signature | 5.1.4-xenial |
| Ubuntu 14.04 | Toolchain PGP Signature | Unavailable |
Swift 5.1.3
Date: December 13, 2019Tag: swift-5.1.3-RELEASE
| Platform | Toolchain | Docker Tag |
|---|---|---|
| Xcode 11.3* | Toolchain Debugging Symbols | Unavailable |
| Ubuntu 18.04 | Toolchain PGP Signature | 5.1.3-bionic |
| Ubuntu 16.04 | Toolchain PGP Signature | 5.1.3-xenial |
| Ubuntu 14.04 | Toolchain PGP Signature | Unavailable |
Swift 5.1.2
Date: November 7, 2019Tag: swift-5.1.2-RELEASE
| Platform | Toolchain | Docker Tag |
|---|---|---|
| Xcode 11.2* | Toolchain Debugging Symbols | Unavailable |
| Ubuntu 18.04 | Toolchain PGP Signature | 5.1.2-bionic |
| Ubuntu 16.04 | Toolchain PGP Signature | 5.1.2-xenial |
| Ubuntu 14.04 | Toolchain PGP Signature | Unavailable |
Swift 5.1.1
Date: October 11, 2019Tag: swift-5.1.1-RELEASE
| Platform | Toolchain | Docker Tag |
|---|---|---|
| Xcode 11.0* | Toolchain Debugging Symbols | Unavailable |
| Ubuntu 18.04 | Toolchain PGP Signature | 5.1.1-bionic |
| Ubuntu 16.04 | Toolchain PGP Signature | 5.1.1-xenial |
| Ubuntu 14.04 | Toolchain PGP Signature | Unavailable |
Swift 5.1
Date: September 19, 2019Tag: swift-5.1-RELEASE
| Platform | Toolchain | Docker Tag |
|---|---|---|
| Xcode 11.0* | Toolchain Debugging Symbols | Unavailable |
| Ubuntu 18.04 | Toolchain PGP Signature | 5.1-bionic |
| Ubuntu 16.04 | Toolchain PGP Signature | 5.1-xenial |
| Ubuntu 14.04 | Toolchain PGP Signature | Unavailable |
Swift 5.0.3
Date: August 30, 2019Tag: swift-5.0.3-RELEASE
| Platform | Toolchain | Docker Tag |
|---|---|---|
| Xcode 10.2.1* | Toolchain Debugging Symbols | Unavailable |
| Ubuntu 18.04 | Toolchain PGP Signature | 5.0.3-bionic |
| Ubuntu 16.04 | Toolchain PGP Signature | 5.0.3-xenial |
| Ubuntu 14.04 | Toolchain PGP Signature | Unavailable |
Swift 5.0.2
Date: July 15, 2019Tag: swift-5.0.2-RELEASE
| Platform | Toolchain | Docker Tag |
|---|---|---|
| Xcode 10.2.1* | Toolchain Debugging Symbols | Unavailable |
| Ubuntu 18.04 | Toolchain PGP Signature | 5.0.2-bionic |
| Ubuntu 16.04 | Toolchain PGP Signature | 5.0.2-xenial |
| Ubuntu 14.04 | Toolchain PGP Signature | Unavailable |
Swift 5.0.1
Date: April 18, 2019Tag: swift-5.0.1-RELEASE
| Platform | Toolchain | Docker Tag |
|---|---|---|
| Xcode 10.2.1* | Toolchain Debugging Symbols | Unavailable |
| Ubuntu 18.04 | Toolchain PGP Signature | 5.0.1-bionic |
| Ubuntu 16.04 | Toolchain PGP Signature | 5.0.1-xenial |
| Ubuntu 14.04 | Toolchain PGP Signature | Unavailable |
Swift 5.0
Date: March 25, 2019Tag: swift-5.0-RELEASE
| Platform | Toolchain | Docker Tag |
|---|---|---|
| Xcode 10.2* | Toolchain Debugging Symbols | Unavailable |
| Ubuntu 18.04 | Toolchain PGP Signature | 5.0-bionic |
| Ubuntu 16.04 | Toolchain PGP Signature | 5.0-xenial |
| Ubuntu 14.04 | Toolchain PGP Signature | Unavailable |
Swift 4.x
Swift 4.2.4
Date: March 29, 2019Tag: swift-4.2.4-RELEASE
| Platform | Toolchain | Docker Tag |
|---|---|---|
| Xcode 10.1* | Toolchain Debugging Symbols | Unavailable |
| Ubuntu 18.04 | Toolchain PGP Signature | Unavailable |
| Ubuntu 16.04 | Toolchain PGP Signature | 4.2.4 |
| Ubuntu 14.04 | Toolchain PGP Signature | Unavailable |
Swift 4.2.3
| Download | Date |
|---|---|
| Xcode 10.1* Toolchain Debugging Symbols | |
| Ubuntu 18.04 Signature | |
| Ubuntu 16.04 Signature | |
| Ubuntu 14.04 Signature |
Swift 4.2.2
| Download | Date |
|---|---|
| Xcode 10.1* Toolchain Debugging Symbols | |
| Ubuntu 18.04 Signature | |
| Ubuntu 16.04 Signature | |
| Ubuntu 14.04 Signature |
Swift 4.2.1
| Download | Date |
|---|---|
| Xcode 10.1* Toolchain Debugging Symbols | |
| Ubuntu 18.04 Signature | |
| Ubuntu 16.04 Signature | |
| Ubuntu 14.04 Signature |
Swift 4.2
| Download | Date |
|---|---|
| Xcode 10.0* Toolchain Debugging Symbols | |
| Ubuntu 18.04 Signature | |
| Ubuntu 16.04 Signature | |
| Ubuntu 14.04 Signature |
Swift 4.1.3
| Download | Date |
|---|---|
| Xcode 9.4* Toolchain Debugging Symbols | |
| Ubuntu 16.10 Signature | |
| Ubuntu 16.04 Signature | |
| Ubuntu 14.04 Signature |
Swift 4.1.2
| Download | Date |
|---|---|
| Xcode 9.4* Toolchain Debugging Symbols | |
| Ubuntu 16.10 Signature | |
| Ubuntu 16.04 Signature | |
| Ubuntu 14.04 Signature |
Swift 4.1.1
| Download | Date |
|---|---|
| Xcode 9.3* Toolchain Debugging Symbols | |
| Ubuntu 16.10 Signature | |
| Ubuntu 16.04 Signature | |
| Ubuntu 14.04 Signature |
Swift 4.1
| Download | Date |
|---|---|
| Xcode 9.3* Toolchain Debugging Symbols | |
| Ubuntu 16.10 Signature | |
| Ubuntu 16.04 Signature | |
| Ubuntu 14.04 Signature |
Swift 4.0.3
| Download | Date |
|---|---|
| Xcode 9.2* Toolchain Debugging Symbols | |
| Ubuntu 16.10 Signature | |
| Ubuntu 16.04 Signature | |
| Ubuntu 14.04 Signature |
Swift 4.0.2
| Download | Date |
|---|---|
| Xcode 9.1* Toolchain Debugging Symbols | |
| Ubuntu 16.10 Signature | |
| Ubuntu 16.04 Signature | |
| Ubuntu 14.04 Signature |
Swift 4.0
| Download | Date |
|---|---|
| Xcode 9.0* Toolchain Debugging Symbols | |
| Ubuntu 16.10 Signature | |
| Ubuntu 16.04 Signature | |
| Ubuntu 14.04 Signature |
Swift 3.x
Swift 3.1.1
| Download | Date |
|---|---|
| Xcode 8.3.2* Toolchain Debugging Symbols | |
| Ubuntu 16.10 Signature | |
| Ubuntu 16.04 Signature | |
| Ubuntu 14.04 Signature |
Swift 3.1
| Download | Date |
|---|---|
| Xcode 8.3* Toolchain Debugging Symbols | |
| Ubuntu 16.10 Signature | |
| Ubuntu 16.04 Signature | |
| Ubuntu 14.04 Signature |
Swift 3.0.2
| Download | Date |
|---|---|
| Xcode 8.2* Toolchain Debugging Symbols | |
| Ubuntu 16.04 Signature | |
| Ubuntu 14.04 Signature |
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
| Download | Date |
|---|---|
| Xcode 8* Toolchain Debugging Symbols | |
| Ubuntu 15.10 Signature | |
| Ubuntu 14.04 Signature |
Swift 2.x
Swift 2.2.1
| Download | Date |
|---|---|
| Xcode 7.3.1* | |
| Ubuntu 15.10 Signature | |
| Ubuntu 14.04 Signature |
Swift 2.2
| Download | Date |
|---|---|
| Xcode 7.3* | |
| Ubuntu 15.10 Signature | |
| Ubuntu 14.04 Signature |
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.
Older Snapshots
Xcode| Download |
|---|
| July 22, 2020 Signature |
| July 21, 2020 Signature |
| July 20, 2020 Signature |
Swift 5.3 Development
Swift 5.3 Snapshots are prebuilt binaries
that are automatically created from release/5.3 branch.
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 | Docker Tag |
|---|---|---|
| Xcode Debugging Symbols | Unavailable | |
| Ubuntu 18.04 Signature | nightly-5.3-bionic | |
| Ubuntu 16.04 Signature | nightly-5.3-xenial |
Older Snapshots
XcodeSwift 5.2 Development
Swift 5.2 Snapshots are prebuilt binaries
that are automatically created from swift-5.2-branch branch.
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 | Docker Tag |
|---|---|---|
| Xcode Debugging Symbols | Unavailable | |
| Ubuntu 18.04 Signature | nightly-5.2-bionic | |
| Ubuntu 16.04 Signature | nightly-5.2-xenial |
Older Snapshots
XcodeSwift 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 5.1
- macOS 10.14.6
- Xcode 11 or later
Swift 5.0
- macOS 10.14.4
- Xcode 10.2
Swift 4.2
- macOS 10.13.6
- Xcode 10.0
Swift 4.1
- macOS 10.13.2
- Xcode 9.3 - 9.4
Swift 4.0
- macOS 10.13.2
- Xcode 9.0 - 9.2
Swift 3.1
- macOS 10.11.5
- Xcode 8.3 - 8.3.3
Swift 3.0
- macOS 10.11.5
- Xcode 8.0 - 8.2
Swift 2.2.x
- macOS 10.11
- Xcode 7.2 - 7.3
Supported Target Platforms
- macOS 10.9.0 or later
- iOS 7.0 or later
- watchOS 2.0 or later
- tvOS 9.0 or later
Installation
-
Download the latest package release.
-
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. -
Open Xcode’s
Preferences, navigate toComponents > Toolchains, and select the installed Swift toolchain. -
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.
-
Selecting a Swift toolchain affects the Xcode IDE only. To use the Swift toolchain with command-line tools, use
xcrun --toolchain swiftandxcodebuild -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@forums.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
- Ubuntu 16.04, 18.04 or 20.04 (64-bit)
- CentOS 7, 8
- Amazon Linux 2
Supported Target Platforms
- Ubuntu 16.04, 18.04 or 20.04 (64-bit)
- CentOS 7, 8
- Amazon Linux 2
Installation
- Install required dependencies:
| Ubuntu 16.04 | Ubuntu 18.04 | Ubuntu 20.04 | CentOS 7 | CentOS 8 | Amazon Linux 2 |
|---|---|---|---|---|---|
|
|
|
|
|
|
-
Download the latest binary release above.
The
swift-<VERSION>-<PLATFORM>.tar.gzfile is the toolchain itself. The.sigfile is the digital signature. -
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' \ '5E4D F843 FB06 5D7F 7E24 FBA2 EF54 30F0 71E1 B235' \ '8513 444E 2DA3 6B7C 1659 AF4D 7638 F1FB 2B2B 08C4' \ 'A62A E125 BBBF BB96 A6E0 42EC 925C C1CC ED3D 1561' \ '8A74 9566 2C3C D4AE 18D9 5637 FAF6 989E 1BC1 6FEA'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.
-
Verify the PGP signature.
The
.tar.gzarchives 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 SwiftThen, 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 #3 <swift-infrastructure@swift.org>"If
gpgfails 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
gpgfails to verify and reports “BAD signature”, do not use the downloaded toolchain. Instead, please email swift-infrastructure@forums.swift.org with as much detail as possible, so that we can investigate the problem. -
Extract the archive with the following command:
$ tar xzf swift-<VERSION>-<PLATFORM>.tar.gzThis creates a
usr/directory in the location of the archive. -
Add the Swift toolchain to your path as follows:
$ export PATH=/path/to/usr/bin:"${PATH}"You can now execute the
swiftcommand 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:
-
Swift Automatic Signing Key #3 <swift-infrastructure@swift.org>- Download
- https://swift.org/keys/automatic-signing-key-3.asc
- Fingerprint
8A74 9566 2C3C D4AE 18D9 5637 FAF6 989E 1BC1 6FEA- Long ID
FAF6989E1BC16FEA
To import the key, run:
$ gpg --keyserver hkp://pool.sks-keyservers.net \ --recv-keys \ '8A74 9566 2C3C D4AE 18D9 5637 FAF6 989E 1BC1 6FEA'Or:
$ wget -q -O - https://swift.org/keys/automatic-signing-key-3.asc | \ gpg --import - -
Swift 2.2 Release Signing Key <swift-infrastructure@swift.org>- Download
- https://swift.org/keys/release-key-swift-2.2.asc
- Fingerprint
1BE1 E29A 084C B305 F397 D62A 9F59 7F4D 21A5 6D5F- Long ID
9F597F4D21A56D5F
To import the key, run:
$ gpg --keyserver hkp://pool.sks-keyservers.net \ --recv-keys \ '1BE1 E29A 084C B305 F397 D62A 9F59 7F4D 21A5 6D5F'Or:
$ wget -q -O - https://swift.org/keys/release-key-swift-2.2.asc | \ gpg --import - -
Swift 3.x Release Signing Key <swift-infrastructure@swift.org>- Download
- https://swift.org/keys/release-key-swift-3.x.asc
- Fingerprint
A3BA FD35 56A5 9079 C068 94BD 63BC 1CFE 91D3 06C6- Long ID
63BC1CFE91D306C6
To import the key, run:
$ gpg --keyserver hkp://pool.sks-keyservers.net \ --recv-keys \ 'A3BA FD35 56A5 9079 C068 94BD 63BC 1CFE 91D3 06C6'Or:
$ wget -q -O - https://swift.org/keys/release-key-swift-3.x.asc | \ gpg --import - -
Swift 4.x Release Signing Key <swift-infrastructure@swift.org>- Download
- https://swift.org/keys/release-key-swift-4.x.asc
- Fingerprint
5E4D F843 FB06 5D7F 7E24 FBA2 EF54 30F0 71E1 B235- Long ID
EF5430F071E1B235
To import the key, run:
$ gpg --keyserver hkp://pool.sks-keyservers.net \ --recv-keys \ '5E4D F843 FB06 5D7F 7E24 FBA2 EF54 30F0 71E1 B235'Or:
$ wget -q -O - https://swift.org/keys/release-key-swift-4.x.asc | \ gpg --import - -
Swift 5.x Release Signing Key <swift-infrastructure@swift.org>- Download
- https://swift.org/keys/release-key-swift-5.x.asc
- Fingerprint
A62A E125 BBBF BB96 A6E0 42EC 925C C1CC ED3D 1561- Long ID
925CC1CCED3D1561
To import the key, run:
$ gpg --keyserver hkp://pool.sks-keyservers.net \ --recv-keys \ 'A62A E125 BBBF BB96 A6E0 42EC 925C C1CC ED3D 1561'Or:
$ wget -q -O - https://swift.org/keys/release-key-swift-5.x.asc | \ gpg --import -
Expired Signing Keys
-
Swift Automatic Signing Key #2 <swift-infrastructure@swift.org>- Download
- https://swift.org/keys/automatic-signing-key-2.asc
- Fingerprint
8513 444E 2DA3 6B7C 1659 AF4D 7638 F1FB 2B2B 08C4- Long ID
7638F1FB2B2B08C4
To import the key, run:
$ gpg --keyserver hkp://pool.sks-keyservers.net \ --recv-keys \ '8513 444E 2DA3 6B7C 1659 AF4D 7638 F1FB 2B2B 08C4'Or:
$ wget -q -O - https://swift.org/keys/automatic-signing-key-2.asc | \ gpg --import - -
Swift Automatic Signing Key #1 <swift-infrastructure@swift.org>- Download
- https://swift.org/keys/automatic-signing-key-1.asc
- Fingerprint
7463 A81A 4B2E EA1B 551F FBCF D441 C977 412B 37AD- Long ID
D441C977412B37AD
To import the key, run:
$ gpg --keyserver hkp://pool.sks-keyservers.net \ --recv-keys \ '7463 A81A 4B2E EA1B 551F FBCF D441 C977 412B 37AD'Or:
$ wget -q -O - https://swift.org/keys/automatic-signing-key-1.asc | \ gpg --import -
Docker
Swift offical Docker images are hosted on hub.docker.com/_/swift.
Swift Dockerfiles are located on swift-docker repository.
Supported Platforms
- Ubuntu 16.04
- Ubuntu 18.04
Using Docker Images
-
Pull the Docker image from Docker hub:
docker pull swift -
Create a container using tag
latestand attach it to the container:docker run --privileged --interactive --tty \ --name swift-latest swift:latest /bin/bash -
Start container
swift-latest:docker start swift-latest -
Attach to
swift-latestcontainer:docker attach swift-latest