I'm trying to follow this <guide> with a new KMP p...
# ktor
r
I'm trying to follow this guide with a new KMP project and I'm having some issues with my iosApp, (androidApp works as expected). When I run the iOS simulator with the app it crashes with the following error
Copy code
HttpClient: REQUEST https://<mystagingserver>/auth_token failed with exception: kotlin.IllegalStateException: TLS sessions are not supported on Native platform.
Function doesn't have or inherit @Throws annotation and thus exception isn't propagated from Kotlin to Objective-C/Swift as NSError.
It is considered unexpected and unhandled instead. Program will be terminated.
These are the sourcesets I've set up in my build.gradle.kts file under my shared folder. What am I missing? I added my okhttp dependency for the android project in the separate gradle build file under that module so that side works fine
e
Hey, @Rodrigo Munera, thanks for the question! Could you try moving
libs.ktor.client.cio
to the
jvmMain
source set ?
👀 1
r
I'll try that. there isn't a sourceset defined for it but I'll create it
e
if you don’t need jvm, you can drop it
r
If I move the dependency out of commonMain then my shared ktor client won't build. should I be using a different engine?
e
you can omit and use
HttpClient() {
r
Beautiful! Thank did it 🙂 thank you!
e
@Viktoriya Nikolova could you please log an issue about the tutorial?
✅ 1