iOS uses ObjectiveC and Android Java, so there can be no library that provides the same unmodified user source code for both platforms for the platformโs native language. You could have this (basically) using C. And of course, JavaScript.
In addition, with regard to the wired protocol, AutobahnAndroid and SocketRocket must be absolutely compatible, since both use AutobahnTestsuite to verify protocol compliance.
Above is for a clean WebSocket. If you want to use features of a higher level, that is, Autobahn, such as publication and subscription message templates and RPC provided by WAMP , we plan to have an iOS autorun version that adds those .. on top of SocketRocket. No need to invent a mature, reliable implementation of WebSocket on iOS.
Disclaimer: I am the creator of Autobahn / WAMP.
source share