https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
i

Ivan Fedyanin

02/15/2021, 2:05 PM
Hello, I think initially I put the question in wrong channel, so copying it here! Can anyone recommend an approach for using websockets on iOS in kotlin multiplatform? I have read this thread and question, but I could not find a solution there. Is it possible to use websockets written in kotlin multiplatform in iOS ? My goal is to have a library which can be iused on JVM, Android and iOS. With JVM and Adnroid it seems to be not a problem, but the iOS is an open question
a

Ali Albaali

02/15/2021, 2:19 PM
Doesn't Ktor have support for that? 🤔
i

Ivan Fedyanin

02/15/2021, 2:20 PM
according to the links in my question it does not
👍 1
c

crumpf

02/15/2021, 4:31 PM
The KMM Docs have an example of using platform-specific WebSocket implementations. For iOS, it uses NSURLSession in the standard Apple SDK so additional dependencies are not needed. https://kotlinlang.org/docs/mobile/connect-to-platform-specific-apis.html#example-send-and-receive-messages-from-a-websocket
👍 1
☝️ 1
🙌 1
i

Ivan Fedyanin

02/16/2021, 6:33 AM
Thank you @crumpf
e

Elias DEBS

02/16/2021, 7:27 PM
2 Views