Add WebSocket support for the iOS
See original GitHub issueKtor Version and Engine Used (client or server and name)
Using io.ktor:ktor-client-ios:1.3.2
Describe the bug
This code prints kotlin.IllegalStateException: [generateNonce] is not supported on iOS
:
GlobalScope.launch {
try {
HttpClient {
install(WebSockets)
}.wss(
host = "websocketstest.com",
path = "/service"
) {
send(Frame.Text("timer"))
for (frame in incoming)
println((frame as Frame.Text).readText())
}
} catch (e: Exception) {
println(e)
}
}
Looks like someone tried to fix this here: https://github.com/ktorio/ktor/pull/1535
Issue Analytics
- State:
- Created 3 years ago
- Reactions:11
- Comments:19 (4 by maintainers)
Top Results From Across the Web
WebSocket Options | Apple Developer Documentation
Adds to the list of supported application protocols that will be presented to a WebSocket ... Adds an additional HTTP header to a...
Read more >How to create a native iOS WebSocket client and connect it to ...
Post explaining creating web socket client and server in Swift on iOS and how to connect with demo video and examples. Web sockets...
Read more >Websockets in iOS 13 Using Swift and Xcode 11
Apple has finally added Websockets as first-class citizen to its platforms ... Websockets in iOS 13, macOS 10.15, tvOS 13, watchOS 6, and...
Read more >WebSockets and iOS: Client-side engineering challenges
Learn about the many challenges of implementing a dependable client-side WebSocket solution to provide iOS users with better and faster ...
Read more >WebSockets on iOS – Real-time Communication That Doesn't ...
Downloading the Starscream WebSocket library ... Configuration of WebSockets on iOS is not simple, because there is no built-in API interface that ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi! Any news? Websocket support for iOS (namely for KMM) is really very necessary. Looking forward!
Hi @Hixie, the WebSocket is unsupported on the iOS for now.