Getting handshake error 9806 while trying to conne

2019-08-08 05:58发布

问题:

I am trying to use a library called ObjectiveDDP in my Swift app. I can connect to the sample app like this :

 var meteorClient = initialiseMeteor("pre2", "wss://ddptester.meteor.com/websocket");

When I am trying to connect to my local meteor server , I am getting this error : CFNetwork SSLHandshake failed (-9806)

I am running iOS 8.1 on Simulator. Any idea what I am missing ?

Any help would be appreciated.

回答1:

It's quite likely your local instance does not use SSL.

So protocols like https or wss will not be able to connect.

Try using ws:// instead of wss://