Swift is already on its way to being used in platforms of all kinds, and it’s all thanks to Apple open-sourcing it. So what does open source Swift mean for us as developers? We’ve got the lowdown on every part, starting with the history and working up to the current state of every major project.
- The History of Open Source Swift
- Contributing to Swift
- Cross-Platform Swift
- Server-Side Swift
- The Swift Ecosystem
The History of Open Source Swift
Swift wasn’t always open source. You might have already known that, but it’s still instructional to look back at how it came to be that a company as huge as Apple gave their new language to the community. Fortunately, our own Minwoo Park wrote a short history when Swift was open-sourced!
Get more development news like this
Contributing to Swift
After years of solo work by the core team (plus really solo work by Chris Lattner before that), we all finally got our chance to work on Swift! Apple set up a website for Swift, plus a million mailing lists. They even set up a JIRA instance. (Never thought we’d be so happy to hear about JIRA…)
Most importantly, they launched the
swift-evolution repo, which is where anyone can propose changes to the language. In the 9 months (as of this writing) since its debut, it has accumulated 130 proposals (some rejected) from the community. It’s been incredible to watch developers of all types (HA!) [Ed. note: Plz stop] submit their ideas and have them considered by the core team and the community.
So how might you submit an idea? We’ve got true-to-life tales of two contributors to tell you how they did it, plus a great overview of the contributions everyone has made thus far.
One of the benefits of Swift being open-source is that the community can drive it to other platforms faster than Apple could. (Or would. I personally doubt they would have bothered with Android, at least not this soon.) But with the core team focused on the language itself and the Apple platforms, the other platforms tend to move a lot more slowly. But the community keeps them moving forward!
So the state of Swift on Linux is fairly good at this point, as both these talks can tell you. You can even learn how to set everything up! (You want to develop Android apps using Swift? Sure, it’s technically workable… 😅)
Our favorite success story about this is from the team at flowkey. They’ve already shipped an Android app that uses Swift! They wrote their story in three parts:
- Why we put an app in the Android Play Store using Swift
- How we put an app in the Android Play Store using Swift
- Using JNI in Swift to put an app into the Android Play Store
Running Swift on servers has been by far the most hotly anticipated platform since Apple announced it would be supporting Linux. What iOS developer wouldn’t want to use the same skills and libraries to create their own backend? So there have already been several server frameworks created, and they’re surprisingly full-featured! If you’re looking to make a new backend, look no further. Swift is here!
The Swift Ecosystem
The growth of Swift means a growth of tools and services around it, which make it even easier to build Swift apps. IBM has invested pretty heavily (and famously), but so are lots of smaller companies and even individual developers! There are browser-based sandboxes, a few options for package management, CI (yay?), and tons of libraries.
The least fun part of Swift [Ed. note: 🔥] is maybe secretly the most powerful. SourceKit is obviously best known for crashing (though at least it doesn’t crash Xcode any more), but it can do so much more. It powers most of the ways the Xcode interacts with Swift, which means that you can do all of that your way, plus more.
We’ll keep this up to date with the best content available anywhere. Got suggestions for this guide? Let us know on Twitter!
About the content
This content has been published here with the express permission of the author.