Tom Wayne

    Tom Wayne

    1 year ago
    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
    Big Chungus

    Big Chungus

    1 year ago
    Ktor?
    Tom Wayne

    Tom Wayne

    1 year ago
    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.
    Big Chungus

    Big Chungus

    1 year ago
    CIO is available on ios. Just checked here
    hfhbd

    hfhbd

    1 year ago
    @Big Chungus Wait, you use the CIO engine on iOS too?
    Big Chungus

    Big Chungus

    1 year ago
    I don't do any IOS development, I'm just saying that CIO client engine library is available on IOS
    Search by
    ktor cio
    hfhbd

    hfhbd

    1 year ago
    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
    Jolas

    Jolas

    1 year ago
    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
    Hossein Amini

    Hossein Amini

    1 year ago
    @Jolas is it compatible with iOS < 13?
    alex009

    alex009

    1 year ago
    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
    Hossein Amini

    Hossein Amini

    1 year ago
    @alex009 is it compatible with iOS < 13?