For questions related to Kotlin Multiplatform Mobile, also known as KMM. It is an SDK for iOS and Android app development. Not to be confused with Kotlin Multiplatform which is abbreviated as KMP. KMM is an subset of KMP.
Questions tagged [kmm]
118 questions
3
votes
1 answer
Does KMM works in Android Studio - Windows Version
I need to build an app for both iOS and Android.
I am getting this error after restarting Android Studio.
Kotlin Multiplatform Mobile plugin issue
Kotlin Multiplatform Mobile plugin is supposed to work on macOS only
I am using a windows…

Muath Nassar
- 35
- 1
- 4
2
votes
1 answer
How to use viewModels in Kmm shared module for both IOS and Android Screens
I am new in Kmm I have create a UI with Jetpack compose for android and swift ui for IOS in simple application in kmm, so in shared module I just want to create viewModels for both android and iOS activities but I don't find any proper solution for…

Ahmad Bhatti
- 189
- 1
- 8
2
votes
0 answers
How recover context from androidMain module of Kotlin Multiplatform proyect
I was developing an app where I try to implement a SQLDelight database, in order to I have to create a internal actual function where I keep the cache of the app.
But my problems cames when I try to configurate to AndroidMain module, due to the…

Manuel Lucas
- 636
- 6
- 17
2
votes
1 answer
Android Studio isn't indexing commonMain folder after adding any dependencies to its sourceSet
I'm trying to create module with shared code for Android and iOS, but when I add any dependency to commonMain it's stopping to index that folder. If I remove dependencies, everything is okay. gradlew clean doesn't help. How could I resolve this…

Pavel Kolesnikov
- 31
- 1
2
votes
2 answers
KMM - Casting a sealed class/interface in swift not possible
Within my KMM library I use sealed interfaces/classes to represent certain states/errors.
I decided to use sealed interfaces/classes because these states must have different associated objects.
In the Android code, this also works as expected…

BeneHr
- 21
- 1
- 3
2
votes
1 answer
KMM import common library have no color syntax
Hi i am creating a new project using Kotlin Multi Platform project.
A followed all the instruction from the official documentation : https://kotlinlang.org/docs/multiplatform-mobile-getting-started.html
The only change I made, is that i converted…

Aziz Essid
- 21
- 2
2
votes
1 answer
nav_graph argument error due to ModelClass is not a Serializable or Parcelable in KotlinMultiplatform App
I was developing an KotlinMultiplatform App which implement diferents libraries as NavigationComponent, ktor to networks call, and slqDelight to store local data.
So the error I'm getting in the tag is the following:
Caused by:…

Manuel Lucas
- 636
- 6
- 17
2
votes
1 answer
What is the best way to apply platform specific annotations in Kotlin Multuplatform?
I have some data transfer class which I want to share between platforms. There is only one difference. The implementations have different annotations on different platforms. What is the best way to do it? I know the only one way.
In the…

Vitaliy Tsirkunov
- 453
- 2
- 11
2
votes
1 answer
KMM Kotlin Multiplatform Mobile Error: Could not detect version of installed Xcode
I was gonna try KMM on my machine.
When I trying to run the initialization app "Hello World" on android, it's fine. But when I run it on iOS, there's a problem.
I got Xcode ver 13.1 installed on my machine, before I install the Android Studio.
I…

udin
- 65
- 5
2
votes
1 answer
How debug Kotlin on iOS with Xcode
Currently I am working on one KMM project. It would be really useful to be able to debug the shared code which is in kotlin in xcode project.
I am aware of this solution but I have problem to tell Xcode that *.kt files are source files
to be more…

Amirhossein Hashemi
- 93
- 1
- 9
2
votes
1 answer
KMM dependency issue in Shared Module
We are creating an app using KMM. But we are facing an issue, kSoap2 Library works fine in the android app but when this library used in Shared Directory of Android Studio, it doesn't work and gives error. The Same thing applies to Calendar. It is…

hamza
- 53
- 1
- 6
2
votes
1 answer
KMM template project of Android Studio does not create a runnable project
When I create a new multiplatform project using the KMM Application template in Android Studio, I get the following error:
The Gradle wrapper is required to run the build from Xcode.
Please run the same command with…

eqtèöck
- 971
- 1
- 13
- 27
2
votes
2 answers
Is AES 128 Crypto (Cipher) logic is there in Kotlin Multi Platform (KMM)?
I found AES encryption logic in Kotlin by using JavaX libraries. Since it's specific to java (Android) so it's not executing for iOS.
import javax.crypto.Cipher
import javax.crypto.SecretKey
import javax.crypto.spec.SecretKeySpec
object Crypto {
…

mittapalli hareesh
- 47
- 3
2
votes
1 answer
Kotlin Multiplatform Mobile: Project already has a CocoaPods dependency with name SDWebImage
I have created a demo project to integrate cocoapods into the KMM project. I have followed this link from the official website. At step 3 while reimporting the project, I am receiving the following error.
Project already has a CocoaPods dependency…

Fatin Wasta
- 424
- 1
- 6
- 20
2
votes
1 answer
Kotlin Multiplatform Mobile - Issue while running ios app from Android studio
I'm exploring KMM, I have done with the setup in Android Studio. I could able to run the Android app perfectly, but when I try to run the ios app, facing an issue in configuration setup. Xcode project scheme Dropdown is empty. I have attached a…

Maverick
- 364
- 1
- 5
- 16