It has two parts as follows:įrontend - It converts the Kotlin Code into the IR (Intermediate Representation). Here comes the Kotlin Compiler into the picture. How does the Kotlin code get converted to the source code that is capable of running on iOS? So, Android already has a Virtual Machine(VM) that is easily capable of running it.īut what about iOS, how can it run Kotlin? Can we do it without the Virtual Machine(VM)? Have you ever wondered how it works?įor iOS, Kotlin code must be converted to the source code(native code executable on iOS) that goes inside the framework. For Android, it gets converted to the Java bytecode that can be executed in the JVM. How does it work?įirst, we write the shared code in Kotlin. When we consider the Kotlin Multiplatform just for the two platforms which are Android and iOS, we write the business logic code once which runs on both the platforms. Native UI helps in providing the best user experience to the customers. So, the appearance, behavior, and most importantly, the performance, all remain native. When I say the Kotlin Multiplatform feature is very promising, there is a strong reason behind it, Kotlin Multiplatform let us reuse the business logic and does not impose any restrictions on how we build our App's UI. I love investing my time in learning these hard things the hard way and then sharing them with all of you. When we know how it works, we can get the most out of it. In this blog, we will learn how the Kotlin Multiplatform works. The Kotlin Multiplatform feature is very promising. I am Amit Shekhar, a mentor helping developers in getting high-paying tech jobs.īefore we start, I would like to mention that, I have released a video playlist to help you crack the Android Interview: Check out Android Interview Questions and Answers.
0 Comments
Leave a Reply. |