Skip to content

Commit 33cd0eb

Browse files
authored
Merge pull request #1275 from finagolfin/get-droid
Update Android getting started doc with latest trunk snapshot, info on installing the 6.3 snapshot, and linking swift-java
2 parents ad2821c + 76c9d3f commit 33cd0eb

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

documentation/articles/swift-sdk-for-android-getting-started.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,34 +25,38 @@ The first thing to note is that while `swift` may already be installed on your s
2525
The easiest and recommended way to manage host toolchains on macOS and Linux is to use [the swiftly command](/swiftly/documentation/swiftly/getting-started) command. Once that has been setup, you can install the host toolchain with:
2626

2727
```console
28-
$ swiftly install main-snapshot-2025-10-16
29-
Installing Swift main-snapshot-2025-10-16
28+
$ swiftly install main-snapshot-2025-12-17
29+
Installing Swift main-snapshot-2025-12-17
3030
Installing package in user home directory...
31-
main-snapshot-2025-10-16 installed successfully!
31+
main-snapshot-2025-12-17 installed successfully!
3232

33-
$ swiftly use main-snapshot-2025-10-16
34-
The global default toolchain has been set to `main-snapshot-2025-10-16` (was 6.2.0)
33+
$ swiftly use main-snapshot-2025-12-17
34+
The global default toolchain has been set to `main-snapshot-2025-12-17` (was 6.2.3)
3535

3636
$ swiftly run swift --version
37-
Apple Swift version 6.3-dev (LLVM 0d0246569621d5b, Swift 199240b3fe97eda)
37+
Apple Swift version 6.3-dev (LLVM 2bc32d2793f525d, Swift f1a704763ffd2c8)
3838
Target: arm64-apple-macosx15.0
3939
```
40+
Alternately, you can install the latest `6.3-snapshot-2025-12-14`.
4041

4142
#### 2. Install the Swift SDK for Android
4243

4344
Next, download and install the Swift SDK bundle using the built-in `swift sdk` command:
4445

4546
```console
46-
$ swift sdk install https://download.swift.org/development/android-sdk/swift-DEVELOPMENT-SNAPSHOT-2025-10-16-a/swift-DEVELOPMENT-SNAPSHOT-2025-10-16-a_android-0.1.artifactbundle.tar.gz --checksum 451844c232cf1fa02c52431084ed3dc27a42d103635c6fa71bae8d66adba2500
47+
$ swift sdk install https://download.swift.org/development/android-sdk/swift-DEVELOPMENT-SNAPSHOT-2025-12-17-a/swift-DEVELOPMENT-SNAPSHOT-2025-12-17-a_android.artifactbundle.tar.gz --checksum 5b5cd4da30ececb28c678c3a17a922f3c5fdb82f0ff6dc777bd44275fcc222e0
4748

48-
Swift SDK bundle at `https://download.swift.org/development/android-sdk/swift-DEVELOPMENT-SNAPSHOT-2025-10-16-a/swift-DEVELOPMENT-SNAPSHOT-2025-10-16-a_android-0.1.artifactbundle.tar.gz` successfully installed as swift-DEVELOPMENT-SNAPSHOT-2025-10-16-a-android-0.1.artifactbundle.
49+
Swift SDK bundle at `https://download.swift.org/development/android-sdk/swift-DEVELOPMENT-SNAPSHOT-2025-12-17-a/swift-DEVELOPMENT-SNAPSHOT-2025-12-17-a_android.artifactbundle.tar.gz` successfully installed as swift-DEVELOPMENT-SNAPSHOT-2025-12-17-a-android.artifactbundle.
4950
```
5051

52+
Similarly, you can install the latest 6.3 snapshot by copy-pasting [the install commands shown
53+
for the various SDK bundles](/install/macos/#swift-sdk-buindles-dev) on the install pages.
54+
5155
You should now see the Android Swift SDK included in the `swift sdk list` command:
5256

5357
```console
5458
$ swiftly run swift sdk list
55-
swift-DEVELOPMENT-SNAPSHOT-2025-10-16-a-android-0.1
59+
swift-DEVELOPMENT-SNAPSHOT-2025-12-17-a-android
5660
```
5761

5862
#### 3. Install and configure the Android NDK
@@ -73,7 +77,7 @@ Once you have downloaded and unpacked the NDK, you must link it to the Swift SDK
7377

7478
```console
7579
$ cd ~/Library/org.swift.swiftpm || cd ~/.swiftpm
76-
$ ./swift-sdks/swift-DEVELOPMENT-SNAPSHOT-2025-10-16-a-android-0.1.artifactbundle/swift-android/scripts/setup-android-sdk.sh
80+
$ ./swift-sdks/swift-DEVELOPMENT-SNAPSHOT-2025-12-17-a-android.artifactbundle/swift-android/scripts/setup-android-sdk.sh
7781
setup-android-sdk.sh: success: ndk-sysroot linked to Android NDK at android-ndk-r27d/toolchains/llvm/prebuilt
7882
```
7983

@@ -150,9 +154,8 @@ Hello, world!
150154

151155
Congratulations, you have built and run your first Swift program on Android!
152156

153-
Note that Android applications are typically not deployed as command-line executable tools. Rather, they are assembled into an `.apk` archive and launched as an app from the home screen. To support this, Swift modules can be built as shared object libraries for each supported architecture and included in the app archive. The Swift code can then be accessed from the Android app — which is typically written in Java or Kotlin — through the Java Native Interface ([JNI](https://developer.android.com/training/articles/perf-jni)).
157+
Note that Android applications are typically not deployed as command-line executable tools. Rather, they are assembled into an `.apk` archive and launched as an app from the home screen. To support this, Swift modules can be built as shared object libraries for each supported architecture and included in the app archive. The Swift code can then be accessed from the Android app — which is typically written in Java or Kotlin — through the Java Native Interface ([JNI](https://developer.android.com/training/articles/perf-jni)) by using the [swift-java](https://github.com/swiftlang/swift-java) interoperability library and tools.
154158

155159
Visit the [swift-android-examples](https://github.com/swiftlang/swift-android-examples) repository to see a variety of projects that demonstrate how to build full Android applications that utilize the Swift SDK for Android.
156160

157161
These larger development topics will be expanded on in future articles and documentation. In the meantime, please visit the [Swift Android forums](https://forums.swift.org/c/platform/android/115) to discuss and seek help with the Swift SDK for Android.
158-

0 commit comments

Comments
 (0)