becvert/cordova-plugin-websocket-server

[iOS] Not working with Firefox client

TheJKM opened this issue · 3 comments

Hi, I have problems connecting to my websocket server running on iOS 10.3.3 using any version of Firefox. I found this issue (zwopple/PocketSocket#34), made those two changes using the fork of PocketSocket used in this plugin. I compiled libPocketSocket.a from this code and replaced the version in this plugin with mine. But every time I want to use my library, with and without the modifications, I get these messages at runtime:
2017-08-28 20:17:58.817040+0200 SimpleCam[4132:2418826] -[PSWebSocketServer setTcpNoDelay:]: unrecognized selector sent to instance 0x178134b40 2017-08-28 20:17:58.817718+0200 SimpleCam[4132:2418826] *** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: <NSInvalidArgumentException> -[PSWebSocketServer setTcpNoDelay:]: unrecognized selector sent to instance 0x178134b40
So, my question is: What do I have to do (maybe settings in Xcode?) to use my library with this Plugin? I'm using Xcode 8.3.3 on macOS 10.12.6.
BTW: my library is only 843 KB, while the one bundled with this plugin is 4,2 MB...

This plugin uses the couchbasedeps fork of the zwopple PocketSocket.
And since I added the tcpNoDelay option I have my own fork too.

The lib is bigger because it is universal. It works for multiple architectures (x86_64, arm...) and is bitcode compatible.

I'll have a look at that issue with firefox. I'll probably make my fork of PocketSocket available and the build script too.

Please try with this version: libPocketSocket.zip

Check with other clients too
And if it's working for you I'll do a proper release in the coming days.
Thank you

Wow, it works!
Tested with Firefox 55.0.3 on macOS Sierra, Linux (Kubuntu 17.04) and Windows 8.1, Chrome 60 on macOS Sierra, Safari 10.1.2 on macOS Sierra, Safari 11 Beta on macOS High Sierra Beta.
Thank you very much!