How To Install Swift 2.2.1 on Ubuntu 15.10 (Wily Werewolf)

Swift 2.2.1 recently released, is an interactive and fun programming language for iOS, OS X, tvOS, and watchOS. The syntax is concise yet expressive, and apps run lightning-fast. Swift 2.2 brings new syntax, new features, and some deprecations too.

swift apple

  • Swift 2.2 includes support for Swift on Linux. The Linux port is still relatively new and in this release does not include the Swift Core Libraries (which will appear in Swift 3). The port does, however, include LLDB and the REPL.
  • Swift 2.2 introduces a new compiler directive that makes cross-version compatibility a cinch: you can now specify blocks of code that should be read only if the compiler supports a specific Swift language version
  • As of Swift 2.2, any keyword can be used as an argument label, with the exception of inout, var, and let
  • Swift 2.2 introduces the ability to compare two tuples for equality, which means it will check each element in one tuple against the matching element in another, and report true if all elements match

See announcement for complete details of new features

Install Swift 2.2.1 on Ubuntu 15.10

sudo apt-get install clang libicu-dev

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

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

Continue

wget https://swift.org/builds/swift-2.2.1-release/ubuntu1510/swift-2.2.1-RELEASE/swift-2.2.1-RELEASE-ubuntu15.10.tar.gz

tar xzf swift-2.2.1-RELEASE-ubuntu15.10.tar.gz

export PATH=swift-2.2.1-RELEASE-ubuntu15.10/usr/bin/:"${PATH}"

swift
 
comments powered by Disqus