So i want to develop a basic chat application using socket.io. I’m using this framework which is essentially just a wrapper over SocketRocket.
Now i made a connectToHost:onPort and i receive a 200 in didReceiveResponse. The connectionDidFinishLoading also is called. It finally prints Opening URL_NAME in the openSocket method before i get a EXC_BAD_ACCESS at this method:
[self _performDelegateBlock:^{
if ([self.delegate respondsToSelector:@selector(webSocketDidOpen:)]) { // <- EXC_BAD_ACESSS error here
[self.delegate webSocketDidOpen:self];
};
}];
Any idea what it could be? From my understanding, the framework i’m using should implement this delegate method of Socket Rocket.
Thanks in advance!
Finally found the error and it was rather silly. I should have created a class variable of the SocketIO instance. Thats why the life cycle was over and the delagate was nil.
Ah well!