Published on March 10, 2016
Update December 2016: Swift 3.0.2 for all the RaspberryPi boards is now available here.
This short post just announces the availability of Swift 3.0 (February 15th snapshot) on ARMv6 (built on Raspbian).
This will work with every RaspberryPi 1 (A,B,A+,B+) and the RaspberryPi Zero. If you have a RaspberryPi 2,3 or any other ARMv7 board remember that you can find pre-built Swift binaries more optimized for that specific platform here.
As an improvement from the Swift 2.2 release, this package also contains Foundation and XCTest, and it’s what i recomment you to use.
Once you have installed clang, that is the only dependency we need, to use the swift compiler, just download and decompress the archive:
sudo apt-get update sudo apt-get install clang wget https://www.dropbox.com/s/smk3ek5lfa8ae09/swift-2016-02-15.tar.gz tar xzf swift-2016-02-15.tar.gz
To compile a helloworld.swift:
And as usual, SwiftyGPIO has been tested with this release on a RaspberryPi A and works as expected.
Did you like this article? Follow me on Twitter!