Install Swift
Whether you are a beginner or an experienced programmer, learning and using Swift can open up opportunities for you to build innovative applications for Apple devices and applications beyond Apple’s ecosystem. Not only can you use Swift on macOS, but using Swift on Linux and Windows makes Swift a valuable language for developers looking to work across different platforms and environments.
Follow these general steps to start using Swift:
- Choose your development platform below and follow the instructions to install the latest version of Swift. See the supported platforms page for the Swift-supported platforms.
- After the installation is complete, you can verify the installation by running the
swift —version
command.
Tip: You can also download nightly snapshots and older releases.
Latest Release: Swift 5.10
macOS
-
Xcode
Download the current version of Xcode which contains the latest Swift release.
Download Xcode
Additional install options for macOS:
- Package Installer - Package installers (.pkg) are available on download page.
Linux
-
Docker
The offical Docker images for Swift.
Instructions
Additional install options for Linux:
- Tarball - Tarball packages are available on download page.
- RPM - Swift 5.10 RPMs for Amazon Linux 2 and CentOS 7 are for experimental use only. Please provide your feedback.
Windows
-
Package Manager
Install Swift via Windows Package Manager (aka WinGet).
Instructions
Additional install options for Windows:
- Scoop - Install Swift via Scoop.
- Package Installer - Package installers (.exe) are available on download page.