https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
a

Aaron Waller

05/29/2021, 11:52 AM
Hey Everyone, I am new to KMM and run into the same problem over and over again. When I create a project with the KMM plugin and open the xcworkspace file everything works fine. But sometimes after relaunching Xcode it fails to build all of a sudden and I get the error message:
no such module 'shared'
I tried rebuilding the project but nothing helps. When I create a new project it works fine at first. I also tried to run
pod update
but nothing helps. P.S I'm pretty new to KMM and IOS EDIT I fixed it by removing
Copy code
implementation("io.ktor:ktor-client-ios:1.5.4")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-ios:1.5.0-native-mt")
from the iosMain module. What is the right dependency for using coroutines or something for concurrency?
j

John O'Reilly

05/29/2021, 12:22 PM
There's possibly a few things going on here....re. coroutines you should just need something like following in
commonMain
section
Copy code
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.kotlinCoroutines}") {
    isForce = true
}
re. ktor, I believe that version of Ktor that you're using isn't compatible with kotlinx corouties 1.5 (-native-mt)....you might need to update it to the recently released 1.6 version
fwiw I've been making updates to Kotlin 1.5 related dependencies in following branch (waiting on Compose beta08 to support 1.5 before can merge to main branch)....but you can perhaps check build setup/dependency versions there https://github.com/joreilly/PeopleInSpace/tree/kotlin_1_5
a

Arkadii Ivanov

05/29/2021, 10:32 PM
Re "coroutines or something", you may want to check Reaktive as well: https://github.com/badoo/Reaktive
2 Views