'Kotlin Multiplatform Mobile(KMM) .I want to make my Android application work on iOS using KMM?
eg: details about the questions ..i have a android app project using Kotlin. I want to make my Android application work on iOS using KMM.i haven't found any live solution yet. it would be great if you've any practical example to to make my Android application work on iOS using KMM?
Solution 1:[1]
there is no magic tool to do this ...
you can follow this steps ..
first you should convert java code to kotlin code by
Android Studio Menu -> Code -> Convert Java File to Kotlin File
then you should separate your code into business layer and presentation layer you can know about it by reading clean architecture Android
then we will put business layer into Shared Module
then we will put presentation layer into ANDROID APP
then application will be ready to use his business logic into ios
then you can write your swift code into IOS APP
note :
Presentation layer contain view , viewmodel and any Platform dependent tools like workmanger
business layer contain network and caching code like KTOR , SQLDELIGHT and any logic that may be shared between Android and Ios
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | dawoud |
