Hacker Newsnew | past | comments | ask | show | jobs | submit | mihael's commentslogin


Thanks


It’s a different approach with different goals.

SwifDroid is about native Android development in Swift. You’re not writing cross-platform UI. You’re writing Android-specific UI in Swift, using Android’s own view system and APIs directly. The goal is to enable full, idiomatic Android apps entirely in Swift, including activities, fragments, AndroidX, and Material, without touching Java, Kotlin, or XML.

While the others focus on “write UI once, run anywhere,” often with trade-offs in UX, SwifDroid focuses on writing natively for Android and having full control from Swift.


Yes, exactly. SwifDroid automatically wires all the necessary Gradle dependencies, so you don’t have to manage them manually.


Does it still ultimately call into gradle to perform the build?


Yes, since we need Gradle dependencies in order to build rich UI with AndroidX or Material Design. But if you're interested in a minimal approach without Gradle, check out the example by @purpln here: https://github.com/purpln/android-example


I just released Swift Stream IDE v1.17.0, which now supports full native Android app development entirely in Swift. You can build apps without touching XML, Java, or Kotlin.

Under the hood, projects are powered by SwifDroid, a framework I built that handles the Android application lifecycle, activities, fragments, and UI widgets (Android, AndroidX, Material, Flexbox) while automatically managing Gradle dependencies. The IDE compiles Swift, generates a full Android project ready for Android Studio.

This is the first public release. Both tooling and framework are open-source and MIT-licensed.


The threshold question is crossover: what Android development experience is required for Swift developers, and what Swift experience is required for Android/Kotlin developers? By saying "without touching XML, Java, or Kotlin", are you implying that Swift developers without Android experience could be successful?

Then the questions is: roughly what percentage of Kotlin or Flutter apps could be writable in Swift? Today and next year?


One thing useful for Swift is it's native interop with C / C++ libraries. These are often presented as SwiftPM or Bazel dependencies. How do you handle SwiftPM dependencies?


Probably using the compiler flags directly? I’ve never heard of a Bazel dependency in Swift, and precompiled c++ was a huge pain in SwiftPM a year ago. I work on ObjC++/Swift/Metal as my day job and just use a Makefile because it’s easier


Interestinggg. How does binding Java/Kotlin code into Swift work?

(we're trying to do something very similar with Rust instead of Swift)


It works primarily through the jni-kit library, which handles JNI bindings between Swift and Java/Kotlin. You can check out the full docs here: https://docs.swifdroid.com/jni-kit/

On top of that, the IDE also auto-generates required Java/Kotlin classes on the fly, for example, for Activities.


For Dioxus?

I was looking into something similar, on Flutter it uses FFIgen and JNIgen, might be something to look into on the Rust side. From what I've seen, it's quite difficult from pure Kotlin to Rust, as I was looking for the equivalent of the flutter_rust_bridge package when experimenting with Compose Multiplatform, as I have some crates I need to use, but I ultimately gave up because it was not straightforward at all.


Another approach is swift-java, which uses Swift macros and also supports Panama.

https://github.com/swiftlang/swift-java


Panama will probably never make it to Android, given Google's behaviour on updating Java support.


Congrats, I've definitely been looking to just centralize with Swift. Great work!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: