As an iOS developer, I’m learning Dart language recently. After a couple of days self-learning, I admit Dart is a powerful and modern language. But to be honest, I dislike the syntactic sugar, it looks like wired for me. So can someone tell me is there any way to build cross-platform apps using Swift?
build cross-platform apps using Swift
2
Answers
If you don’t meant to construct a brand new mobile app framework, No.
Kind of.
You can use native code built from Swift with Android NDK(Native Development Kit).
This is a official guide of Swift about Android NDK, but as the guide says,
And NDK is "practically" unusable without a base app made with Java or Kotlin.
For impractical example, you can check an Android app purely made with C in this github repo.
There is a way, I guess, but in my opinion it’s kinda immature at the point. Im talking about Skip. In its core, it’s just a transpiler from Swift to Kotlin / Jetpack Compose. However, there is a big consideration – this framework is not free for commercial usage, keep it in mind. But if you are in Swift, I think it’s fun to give it a try.
You can read docs introduction here