Swift Extends Its Reach: Now Officially Supports Android App Development
So, Apple's Swift programming language is officially spreading its wings to Android. I think it's a pretty big deal because, for a while, if you wanted to use Swift for Android development, you were stuck with community-built tools. Now, Apple is stepping in with an official SDK, and I believe this could make life easier for developers who work across both iOS and Android platforms. This enables developers to craft Android apps with Swift, employing officially endorsed tools, streamlining code sharing between iOS and Android.
What does this mean in practice? Well, it seems Swift can now play nice with Java through something called swift-java. It automatically creates links between Java and Swift, so programmers can combine Swift code with existing Android features and Java code. This interoperability is handled by swift-java, which can automatically generate bindings between Java and Swift.
Interestingly, the Swift Package Index already shows that over 25% of all packages can run on Android. This gives developers a decent starting point with reusable code. It's a good sign that the community is already embracing this cross-platform capability, and it could speed up development times quite a bit. So, if you think about it, developers already have a strong foundation of reusable code to begin with, making the transition smoother.
Availability and Resources
If you're curious and want to try it out, the Swift SDK for Android is available as a nightly preview. You can get it either bundled with the Swift for Windows installer or as a separate download if you're on Linux or macOS. Also, there's a Getting Started guide with instructions and example Android projects written in Swift, walking you through the whole process. I think it is great there are also some guides to help us understand how it works, that is always helpful when trying new things.
The Android Working Group is currently working on a vision document to define future goals, and they're monitoring progress on a public project board. If I were betting, this could really streamline app development for teams targeting both iOS and Android.
Source: Mac Rumors