iOS added support for WebSocket starting iOS 13 and they announced it in WWDC2019. Before that, developers had to rely on third-party libraries such as Starscream or SwiftWebSocket. Now with native support, it all becomes quite easy to add on without adding third-party overhead.
Previously, I wrote about using WebSockets