Hey everyone! I wanted to ask what the general se...
# multiplatform
a
Hey everyone! I wanted to ask what the general sentiment is around networking and KMM. I've found lots of people using KMM, but they keep their networking outside of the shared module. I've gone the other way, and I have the networking within the module, but its caused a lot of headaches, with every version of ktor having a new crash on iOS. Are others seeing this iOS instability, and other than pulling it out of shared, is there some way around it? There's various youtrack and github issues for every crash i've had, and more seem to spring up, but I don't see many people talk about these iOS problems 🤔
w
We have our Network on the KMM side too. We are not experiencing issues so far, not related to the network at least - we had some related to coroutines, but lately not event that. We are still using ktor
1.6.7
, and Kotlin
1.6.10
. We know ktor released a major to
2.0
, but we have not the time to check it out yet. Also we are still using the old memory management for iOS 😬 - in a quick spike to move to the new one, we had crashes everywhere in iOS 😨 and again we miss the time to look more closely what we need to change.
a
We have to use the new memory model ( and the 2.x ktor as a result ), interesting to hear that its ok on the older versions!
p
Lots of networking over here with the new memory model and ktor2 and no issues so far
a
very Interesting! so within iOS no crashes, using ktor&serialization? I've seen a bunch of folks say its fine to use URLSession from within kotlin 🤔
c
I'm curious about this question too because I want to evaluate KMM for a project at work but we have networking on many protocols: http, ws, socketio, action cable, sse, graphql
👍 1
l
I remember seeing a fair bit of instability before the new mm, but ktor seems much better now. Haven’t had any issues after moving to the new mm.
👀 1
d
Ktor 2 + Serialization as well here 👍 All good w/ fully common network code. Not sure why you'd use anything else for KMP networking!