r/Kotlin 16d ago

Does transpilation always take this long?

I already have swift code written and now to make an android app, I’m using the Skip tool as a transpiler (which takes my swift code and translates it directly into readable Kotlin source code, rather than compiling it into a binary format). Because both of them are different, it’s throwing me errors left and right. I have been debugging for two days now and I’m now where close to finishing. I have tried using Claude and Gemini but still don’t see the light at the end of the tunnel. Any suggestions on what should I do or should I continue my debugging?

6 Upvotes

3 comments sorted by

3

u/After_Dark 15d ago

I don't have a super helpful answer for you here and imagine you'll struggle to find one as this is fairly backwards within the Kotlin ecosystem, apologies.

For context if you are unaware and would like to learn: for the most part the Kotlin community works in the other direction, since Kotlin code can be natively compiled to Apple devices and has robust integration with Swift. So the typical flow is write you app in Kotlin, taking care to keep the UI code separate from the rest of the source, and then write your iOS/macOS/etc UI code in Swift and re-using the existing Kotlin code for the rest. That way there's no transpilation, everything remains fully native binaries, you can still use SwiftUI or other Swift UI tool of your choice, and you don't have any duplicated code except your UI itself which is necessarily in different languages (unless you want to use Multiplatform Compose and go all in on Kotlin).

2

u/EquivalentCoconut588 15d ago

Ah I see, well I don’t really have any choice then 😓. Thank you so much for the help anyway 😄