Our client library uses only native components for networking: NSURLSession on HTTPS transport, and CFStream on WebSocket transport.

The mechanism we use is a simple dependency injection pattern:
  • The Java engine wraps all the services it needs for connecting, receiving messages, sending messages etc., behind a Java interface.
  • The Java desktop and Android clients implement this interface with Java classes that use Netty as networking component.
  • The transpilation process scraps the interface implementations, leaving just the bare interface, which then becomes an Obj-C protocol on the iOS client.
  • Finally, the protocol is then implemented with a Obj-C classes that provide the same services using NSURLSession or CFStream as required.


So, our client is actually well aligned with the latest features of NSURLSession. We don't circumvent them using BSD sockets or similar expedients. Our client is, and has always been, a good iOS citizen regarding networking.