Tim, Jon, and I have been working with O’Reilly Media on a free report covering the latest version of Apple’s programming language, Swift 3.
You can download it, for free, over at the O’Reilly website. The report covers:
- a high-level view of Swift 3’s changes and new features, and learn how this version differs from Swift 2
- the Swift Evolution Process and the full list of accepted proposals—including those not yet implemented
- Swift 3’s changes to the language’s syntax, standard library features, and other areas
- Swift 3’s use on the server, and use a simple program to learn about Swift’s use on Linux
- further resources for learning about, working with, and converting projects to Swift 3
This is what a computer linux hacker looks like.
I’ve been working with Swift for Linux, as part of a bunch of teaching material, as well as some conference talks that we’re working on. It’s not super easy to figure out, from searching, the best way to install Swift and Linux, if you’re a Mac user who wants to have a go with it. Here’s what I’ve found.
As it turns out, after extensive research, my feeling is that the best way to run Swift on Linux (on a Mac) is using Vagrant and VirtualBox. I’ve looked at a variety of options, including setting it up manually in a VM, using Docker for Mac, and so on, but this turned out to be the easiest way to do it, and maintain it.
To get Swift on Linux running, on your Mac:
- Download and install VirtualBox.
- Download and install Vagrant.
- Make sure you have Git installed, and clone the following repository: https://github.com/IBM-Swift/vagrant-ubuntu-swift-dev.git
- Once you’ve cloned the repository, change directory into it: vagrant-ubuntu-swift-dev
- Run the command: vagrant up
- Wait. The vagrantfile included in the repository you cloned, which tells Vagrant what to do, downloads Ubuntu 15.10, the Swift prerequisites, the prerequisites for libdispatch, the Swift concurrency library, the Sphinx documentation system, and then clones the Swift repository and creates a script that allows you to build Swift. (This might take a while, and will download a few gigabytes of stuff.)
- Once Vagrant is done, you can run the following command to connect to the Linux installation: vagrant ssh
- Then, once in Linux, run the following script to build Swift: /vagrant/swift-dev/swift/utils/build-script (This might also take a while, depending on the speed/capabilities of your computer.)
- You can then run the following command to verify Swift is up and running: swift –version
- You can then create some .swift files, and compile them with the swiftc command.
Easy! Hope that was helpful to someone.
We’ll be running our fantastic 2-day iOS developer training in Melbourne next month! Join us on the 2nd and 3rd of May, and learn all you need to know for iOS development. Only a few tickets left! Everyone gets an electronic copy of our new book, Learning Swift. Email me if you have any questions.
Hello! We’re running our famous iOS Developer Training again in Melbourne, on May 2 and May 3 this year. We’ll be teaching the latest iOS app development techniques, with Swift. We’re taking expressions of interest, which require no commitment, and will get you a discount code for when registrations actually open! If you have any questions, feel free to email me. Check it, and register your interest, over at the Secret Lab site: http://www.secretlab.com.au/training/ios-mel-2016
… and I’ll have more to say on that topic soon! In the mean time:
Over on the Secret Lab blog we’ve posted an addendum for Swift Development with Cocoa, bringing it up to date for Xcode 6.3 and Swift 1.2.
Check it out here!
We’re going to be running a 1-day Swift Developer Lab in Melbourne, Sydney, and Brisbane in the coming months. These labs are designed for existing iOS developers to get up to speed with Swift development for iOS 8.
You can learn more about the labs over at Secret Lab’s training page. Tickets are available at $250 (which is half price) until 10 November 2014. We’d love to see you there!
If you have any questions, feel free to email me: paris AT paris.id.au