Android Swift SDK
The Swift SDK for Android

原始链接: https://www.swift.org/blog/nightly-swift-sdk-for-android/

## Swift现已适用于Android开发 Swift正在扩展超越苹果生态系统!经过多年的社区努力,**Swift Android SDK**的预览版现已可用,允许开发者使用Swift构建原生Android应用程序。这标志着真正跨平台开发和代码共享的重要一步。 开源Android工作组在这个进展中发挥了重要作用,SDK可以通过Windows、Linux或macOS访问。诸如“入门指南”和示例应用程序之类的资源可帮助开发者入门。值得注意的是,Swift Package Index中超过25%的软件包已经与Android兼容。 此外,**swift-java项目**促进了Swift和Java代码之间的互操作性,从而可以无缝集成现有的Java库。Android工作组正在通过愿景文档和公共项目看板积极塑造Swift在Android上的未来,鼓励社区参与并通过Swift论坛提供反馈。

## Android Swift SDK 摘要 苹果发布了 Android Swift SDK,允许开发者使用 Swift 编写 iOS 和 Android 应用共享的业务逻辑。这不涉及 UI 移植——Android 应用仍将使用原生 UI 工具包,如 Jetpack Compose,或像 Skip.tools 这样的库来桥接 SwiftUI。 讨论的重点在于这是否解决了跨平台开发中的一个关键痛点:UI 不一致性。虽然 Flutter 等框架旨在实现像素级的 UI 复刻,但许多人更喜欢利用原生 UI 元素。该 SDK 专注于代码共享,让开发者可以在每个平台上使用他们喜欢的 UI 工具。 关键点包括:开发者体验的重要性(调试、构建流程)、社区支持与苹果参与的角色,以及与现有解决方案(如 Kotlin Multiplatform 和 React Native)的比较。一些人对采用持怀疑态度,而另一些人则看到了更精简开发流程的潜力,特别是对于已经投资 Swift 生态系统的团队。最终,其成功取决于工具和将 Swift 代码无缝集成到 Android 项目中的能力。
相关文章

原文

Swift has matured significantly over the past decade — extending from cloud services to Windows applications, browser apps, and microcontrollers. Swift powers apps and services of all kinds, and thanks to its great interoperability, you can share code across platforms.

The Android workgroup is an open group, free for anyone to join, that aims to expand Swift to Android. Today, we are pleased to announce nightly preview releases of the Swift SDK for Android.

This milestone reflects months of effort by the Android workgroup, building on many years of grassroots community effort. With the SDK, developers can begin developing Android applications in Swift, opening new avenues for cross-platform development and accelerating innovation across the mobile ecosystem.

The Swift SDK for Android is available today, bundled with the Windows installer or downloadable separately for use on Linux or macOS.

We’ve published a Getting Started guide to help you set up your first native Swift code on an Android device. The Swift for Android Examples help demonstrate end‑to‑end application workflows on Android.

With the Swift SDK for Android, you can now start porting your Swift packages to Android. Over 25% of packages in the Swift Package Index already build for Android, and the Community Showcase now indicates Android compatibility.

The swift-java project enables you to interoperate between Java and Swift. It is both a library and a code generator, enabling you to integrate Swift and Java in both directions by automatically generating safe and performant bindings. To learn about generating bindings to bring your business logic to Android, check out the recent Swift Server Side meetup talk by Mads Odgaard.

This preview release opens many new opportunities to continue improving these tools. We encourage you to discuss your experiences, ideas, tools and apps on the Swift Forums in the Android Category.

The Android workgroup is drafting a vision document, currently under review, for directing future work regarding Swift on Android. This vision will outline priority areas and guide community efforts to maximize impact across the ecosystem. In addition, we maintain a project board that tracks the status of major efforts, as well as official CI for the Swift SDK for Android.

If you’re as excited as we are, join us and help make this ecosystem even better!


Authors

Joannis is the chair of the Android Workgroup, member of the Server Workgroup and maintainer of Hummingbird.


Continue Reading

联系我们 contact @ memedata.com