Skip to content

Commit f74727f

Browse files
committed
Last edits
1 parent 68939a9 commit f74727f

File tree

2 files changed

+81
-75
lines changed

2 files changed

+81
-75
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
layout: new-layouts/post
3+
published: false
4+
date: 2025-11-19 10:00:00
5+
title: "Exploring the Swift SDK for Android"
6+
author: android-workgroup
7+
category: "Developer Tools"
8+
---
9+
10+
Since the announcement of [the preview Swift SDK for Android last month](/blog/nightly-swift-sdk-for-android/),
11+
we've seen a lot of questions about how it works and what's next. Please read on for those answers.
12+
13+
### Swift in the World of Android
14+
15+
Swift is a natively-compiled language to machine code and Android is no different.
16+
That renders it on par with C and C++ code built using the Android NDK, which are
17+
languages more geared towards performance, while Swift attempts a happier balance between
18+
performance, safety, and usability. To enable that, Swift apps must bundle a native
19+
runtime for Android that implements many of its features, including its standard library and
20+
core libraries like Dispatch and [Foundation](/blog/foundation-preview-now-available/).
21+
22+
However, since most Android APIs are only made available through Java and Kotlin
23+
in the Android Runtime (ART), their version of the Java Virtual Machine (JVM)
24+
optimized for mobile, we need to use the Java Native Interface (JNI) and write
25+
bindings both to call Swift from Java and go the other way. That is where the
26+
swift-java project's `jextract` tool and its [new support for generating such
27+
JNI bindings for you](/blog/gsoc-2025-showcase-swift-java/) comes in. Please
28+
watch its author Mads Odgaard's [Server-Side Swift Conference talk from last month](https://www.youtube.com/watch?v=tOH6V1IvTAc)
29+
and try out the tool for yourself with [this example Android app that he put together](https://github.com/swiftlang/swift-android-examples/tree/main/hello-swift-java).
30+
31+
### Swift is Already in Millions of Android Devices
32+
33+
While Swift on Android may seem new, it's important to recognize that there are
34+
already millions of Android devices running Swift today. Production apps with
35+
substantial user bases have been shipping Swift on Android for years, proving
36+
the viability of this approach:
37+
38+
- [Spark](https://play.google.com/store/apps/details?id=com.readdle.spark) - A popular email client using Swift to share code between the iOS and Android versions
39+
- [flowkey](https://play.google.com/store/apps/details?id=com.flowkey.app) - This interactive piano learning app has been built with Swift since its inception
40+
- [MediQuo](https://play.google.com/store/apps/details?id=com.mediquo.main) - A healthcare app leveraging Swift for cross-platform development
41+
- [Naturitas](https://play.google.com/store/apps/details?id=com.naturitas.android) - An organic products marketplace running Swift in production
42+
43+
These aren't experimental apps or proofs of concept—they're real businesses serving
44+
real users at scale. The fact that millions of people use Swift-powered Android apps
45+
daily, often without knowing, shows both the stability of Swift on Android and the
46+
practical benefits it provides to development teams sharing code across platforms.
47+
48+
### Coming up Next
49+
50+
Swift on Android [first got started as soon as the language was open-sourced a decade ago](https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151207/000171.html),
51+
but it is by no means done. [The Android project board lists areas we are working on](https://github.com/orgs/swiftlang/projects/17)
52+
and easy debugging is a high priority for us next. While it [mostly works now](https://github.com/swiftlang/llvm-project/issues/10831),
53+
we need to test it more and make it easy to access. That will likely mean tying
54+
the debugger and [Swift Language Server Protocol tool, sourcekit-lsp](/blog/gsoc-2025-showcase-code-completion/),
55+
into editors like [Visual Studio Code](/blog/gsoc-2025-showcase-swiftly-support-in-vscode/),
56+
Android Studio, and [CodeEdit](https://www.codeedit.app/), another issue on our board.
57+
58+
### Sharing Logic Versus Sharing UI
59+
60+
A common concern is that we do not provide a cross-platform GUI toolkit. As we
61+
write in [our draft vision document](https://github.com/swiftlang/swift-evolution/blob/807b844be42db582e434d1667fc907ae7a7a8775/visions/android.md),
62+
the Android workgroup has no plans to create such a GUI toolkit, but will instead
63+
curate a list of cross-platform UI tools, everything from professional options
64+
like [Skip.tools](https://skip.tools/) (see their [open-source showcase app](https://github.com/skiptools/skipapp-showcase-fuse))
65+
and [SCADE](https://www.scade.io/) to open-source efforts like [FlutterSwift](https://github.com/PADL/FlutterSwift),
66+
[SwiftGodot](https://github.com/migueldeicaza/SwiftGodot), and the in-progress
67+
[SwiftCrossUI](https://swiftcrossui.dev/).
68+
69+
### Diving in
70+
71+
Finally, we intend to bring you interviews and information from those using Swift
72+
on Android already, as pioneering companies like [Readdle](https://readdle.com/blog/swift-for-android-our-experience-and-tools)
73+
and [Flowkey](https://medium.com/@ephemer/why-we-put-an-app-in-the-android-play-store-using-swift-96ac87c88dfc)
74+
have written about using Swift on Android for the last decade. The Left Bit's Pierluigi Cifani
75+
[wrote about their experiences recently](https://forums.swift.org/t/thoughts-on-swift-for-android/80961),
76+
gave [a great talk at NSSpain 2025 a couple months ago](https://youtu.be/EIGl6GOo210),
77+
and was [interviewed by Swift Toolkit last month](https://www.swifttoolkit.dev/posts/dc-pier).
78+
79+
Swift on Android has been a community effort for the last decade, snowballing
80+
from that initial patch to many developers and businesses making their livelihood
81+
with it today. Join us to make it even better!

_posts/2025-11-19-how-swift-for-android-works.md

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)