You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/articles/swift-sdk-for-android-getting-started.md
+15-12Lines changed: 15 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,34 +25,38 @@ The first thing to note is that while `swift` may already be installed on your s
25
25
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:
26
26
27
27
```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
30
30
Installing package in user home directory...
31
-
main-snapshot-2025-10-16 installed successfully!
31
+
main-snapshot-2025-12-17 installed successfully!
32
32
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)
35
35
36
36
$ 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)
38
38
Target: arm64-apple-macosx15.0
39
39
```
40
+
Alternately, you can install the latest `6.3-snapshot-2025-12-14`.
40
41
41
42
#### 2. Install the Swift SDK for Android
42
43
43
44
Next, download and install the Swift SDK bundle using the built-in `swift sdk` command:
44
45
45
46
```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
47
48
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.
49
50
```
50
51
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
+
51
55
You should now see the Android Swift SDK included in the `swift sdk list` command:
setup-android-sdk.sh: success: ndk-sysroot linked to Android NDK at android-ndk-r27d/toolchains/llvm/prebuilt
78
82
```
79
83
@@ -150,9 +154,8 @@ Hello, world!
150
154
151
155
Congratulations, you have built and run your first Swift program on Android!
152
156
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.
154
158
155
159
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.
156
160
157
161
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.
0 commit comments