Hey ppl, I'm just implementing <example> from offi...
# multiplatform
n
Hey ppl, I'm just implementing example from official site, it runs fine in 🤖 but have issue in iOS, returns, I see the same issue in github, shows already fixed but still here, using 🥹
Copy code
val ktorVersion = "2.1.2"
Exception doesn't match @Throws-specified class list and thus isn't propagated from Kotlin to Objective-C/Swift as NSError.
It is considered unexpected and unhandled instead. Program will be terminated.
Uncaught Kotlin exception: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen io.ktor.client.request.HttpRequestPipeline@1cfa708
thats all the code
h
Just a guess, do you use the new MM or Kotlin 1.7.20+? Alternative, you could try to put the client as private variable.
n
```kotlin("multiplatform")
kotlin("plugin.serialization") version "1.7.21"```
...
Copy code
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
Copy code
1.7.10
was multiplatform version, updating now
🎉
h
Yeah, 1.7.20 enables the new MM by default. Using the old MM is not supported with Ktor 2. And you should use the same version for Kotlin and Kotlin plugin serialization
n
thanks a lot