Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SocketRocket not working on iOS 5.0

I just made a simple real-time text chat application using SocketRocket. It works great on iOS 6.0 and 5.1 but when I try to run it on 5.0 when connecting I get the following error...

Websocket Failed With Error Error Domain=NSOSStatusErrorDomain Code=-9800 "The
operation couldn’t be completed. (OSStatus error -9800.)"
UserInfo=0x6e506e0 {}

Does anyone have any idea what this could mean or how to fix it? I browsed the issues on github but couldnt find anything and its claimed to work on iOS5+.

EDIT: To add, this is when I test on simulator. I dont have a device that has 5.0, so im not sure if fails on the phone in the same way. Also, if I use ws as opposed to wss (encrypted), it seems to work fine.

like image 816
Arbel Avatar asked Feb 04 '13 08:02

Arbel


People also ask

How do I add socketrocket to my project?

You can also include SocketRocket as a subproject inside of your application if you'd prefer, although we do not recommend this, as it will increase your indexing time significantly. To do so, just drag and drop the SocketRocket.xcodeproj file into your workspace.

How to use testchat with socketrocket?

Make sure your running destination is either your Mac or any Simulator SocketRocket includes a demo app, TestChat. It will "chat" with a listening websocket on port 9900. The sever takes a message and broadcasts it to all other connected clients. It requires some dependencies though to run.

Does socketrocket conform to Autobahn's fuzzing tests?

You can compare to what modern browsers look like here. SocketRocket currently conforms to all core ~300 of Autobahn 's fuzzing tests (aside from two UTF-8 ones where it is merely non-strict tests 6.4.2 and 6.4.4). TLS (wss) support, including self-signed certificates.

How does srwebsocket work in Python?

SRWebSocket will retain itself between - (void)open and when it closes, errors, or fails. This is similar to how NSURLConnection behaves (unlike NSURLConnection, SRWebSocket won't retain the delegate). Included are setup scripts for the python testing environment. It comes packaged with vitualenv so all the dependencies are installed in userland.


1 Answers

This error has been reported over problems with iOS's SSL authentication. One report suggested changing from kCFStreamSocketSecurityLevelTLSv1 to kCFStreamSocketSecurityLevelSSLv3.

like image 75
Walt Sellers Avatar answered Oct 03 '22 17:10

Walt Sellers