My first experience with Kotlin Native

It’s now possible to share code between my android & ios apps ??? What’s the magic behind that ?

Kotlin can compile to ANYTHING !

Kotlin-Native Target Platforms

How I created my multi-platform project

How a multi-platform project looks like ?

Generate .frameworks

Frameworks location
Import Framework

Understand Kotlin Types

How Kotlin types as bounds

What can I put my common module ?

Content of the common module
Common module hierarchy

Platform-specific Implementation by library

Write iPhone code with Kotlin

Interface Settings — Common
Implementation of Settings — iOS

Platform-specific Implementation by Injection

Dependency Manager — iOS
DependencyManager — Android

Create the Android App

Finally, create my XCode app

XCode controller

My opinion about Kotlin-Native

Imagine when all libraries we use will have their implementation in core/jvm/ios, we can write all our architecture code inside this framework, and only develop the UI on each platform !

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store