Hello everybody, Iam developing KMM used by iOS an...
# multiplatform
t
Hello everybody, Iam developing KMM used by iOS and Android client. I need to use websockets there.Do you have experience with any library which works both for iOS and Android part? Thanks
b
Ktor?
t
According to the KTOR doc: Ktor provides Websocket client support for the following engines: CIO, OkHttp, Js. None of them is compatible with iOS so it looks like I cant use it for WS on iOS.
👍 1
b
CIO is available on ios. Just checked here
h
@Big Chungus Wait, you use the CIO engine on iOS too?
b
I don't do any IOS development, I'm just saying that CIO client engine library is available on IOS
Search by
ktor cio
h
I tested it with CIO, but
TLS sessions are not supported on Native platform.
Fortunately, you can use
ktor-client-ios
, based on iOS
URLSession
j
WebSockets aren't supported in ktor yet. But we have our own implementation. https://github.com/ln-12/kmm-websocket This might be helpful @Martin Rajniak
h
@Jolas is it compatible with iOS < 13?
a
also you can use custom ktorEngine wrapper as i do here - https://github.com/Alex009/ktor-client-ios-websockets later this engine will be available in moko-network - https://github.com/icerockdev/moko-network/issues/149
h
@alex009 is it compatible with iOS < 13?
542 Views