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
1
vote
2 answers
How to successfully publish a KMM library on localMaven() for android project to consume it?
I'm trying to integrate KMM library I made with my Android project. Till now I've successfully published the KMM library locally by following the steps here
But unfortunately when trying to add it as a dependency in my Android project the project…

Kareem Waleed
- 93
- 1
- 10
1
vote
2 answers
Ktor httpclient auth feature not working on IOS
I am developing a KMM project and the authentication works well on the Android app. However when I added the Auth feature in the httpclient (located in the shared.commonMain) the ios app failled at runtime with the following message
Function…

Opr Vld
- 69
- 1
- 10
1
vote
2 answers
KMM dependencies in commonMain
If I add coroutines dependency I can use it in shared module.
But if I add my own Kotlin library with MyClass class in it, I can't see MyClass in shared module:
val commonMain by getting {
dependencies {
…

badadin
- 507
- 1
- 5
- 18
1
vote
1 answer
How do I add a watchOS target to my existing KMM project?
I have a project that I made using KMM plugin on android studio for Android and iOS. The project seems to be running fine.
Now I want to add a watchOS target to the existing ios App and have no clue how to go about this.
My shared build.gradle.kts…

Shivam Dhuria
- 35
- 1
- 7
1
vote
0 answers
KMM How to use kotlin generics in swift?
sorry for my bad english :(
I want to create app with KMM, and maximize shared code. And only that i want to write twice is UI and Navigation. So i create ViewModel in shared code.
open class ViewModel(initialState: T) where T : ViewState {
…

iamthevoid
- 438
- 4
- 16
1
vote
1 answer
Kotlin Multiplatform Module Library
I've been working on some library which we want to ship for both Android and iOS, so far we were working for Android and iOS separately. Now considering that so many people started using KMM for their application, I just wanted to know if anyone has…

lakshya
- 129
- 1
- 3
1
vote
0 answers
Incompatible Kotlin/Native libraries
Android Studio 4.1.3
Brand new KMM project. All defaults accepted. No new code added, right out of the gate:
Incompatible Kotlin/Native libraries
There are 2 third-party libraries attached to the project that were compiled with an older…

Dmitri
- 2,563
- 1
- 22
- 30
1
vote
1 answer
Kotlin coroutines delay do not work on IOS queue dispatcher
I have a KMM app, and there is code:
fun getWeather(callback: (WeatherInfo) -> Unit) {
println("Start loading")
GlobalScope.launch(ApplicationDispatcher) {
while (true) {
val response =…

Alexandr Izmaylov
- 35
- 1
- 7
1
vote
1 answer
Gradle build for sqldelight Generation failed with line 17:10 - '{' expected, got ':' Android Studio version 4.1.2
I am converting a working Android Studio app to the KMM Environment. At this point I have a very simple KMM framework. Once I added SQLDelight to the common packages I started getting the following error on my build. I have checked every example I…

BroPage
- 129
- 10
1
vote
0 answers
My iPhone won't show up in "Execution List" on Android Studio
I'm trying my hand at Kotlin Multiplatform Mobile, and am trying to run the demo app on an iPhone. I am able to run it easily on the iPhone Simulator from Android Studio itself, but if I connect my real iPhone to the MacBook, I am unable to see it…

Vyom Maitreya
- 420
- 4
- 9
0
votes
0 answers
kmm supend fun throw exception in swift
There is a suspend fun in the common code
class HttpClientEngine22 {
suspend fun printer1() {
CoroutineScope(Dispatchers.Default).launch {
}
}
}
when the suspend funs called from swift , on android everything is working…

ASA
- 371
- 1
- 3
- 11
0
votes
0 answers
Use KVP for Swift in Kotlin Multiplatform Projects
im currently developing a KMP project, where I have to dynamically change values based on a path. In JVM Projects I can use Spring Expression Language that does this reflection based.
In Swift and iOS you can do use KVC. The restriction is, that im…

Ditscheridou
- 381
- 1
- 5
- 18
0
votes
1 answer
@Synchronized is not working as expected in KMM
I have a Ktor class where I need to do action on unauthorized exception(when token is expired), for this action I need to have synchronized action, otherwise it is not working correctly, the problem is that @Synchronized is not synchronize the…

Svilen Rusev
- 309
- 4
- 15
0
votes
1 answer
KMM & KTOR - iOS project with Framework library crashes when shared pod is imported in both targets
I have created a new KMM project, added only KTOR dependencies (following online guides step by step), and it's working perfectly on both Android and iOS devices.
For my purposes I'm using
KTOR 2.0.1 libraries
KMM plugin V.…

Dave M.
- 82
- 9
0
votes
1 answer
Can you work with Kotlin Multiplatform Mobile (KMM) using Windows for Android part?
I wanted to enable one of my Android project to the new KMM but will deploy only for Android platform for the time being. According to this FAQ page it seems that the plugin works only for macOS. But was confused on the next paragraph stating
The…

Bitwise DEVS
- 2,858
- 4
- 24
- 67