I m using SignalR-ObjC Client to provide communication between my IOS application and .Net server.
I can connect with longpulling and invoke methods from self-host cros
seems to be a problem with the protocol (SRClientTransportInterface) implementation in SRWebSocketTransport.
Actually is:
- (void)send:(id )connection data:(NSString *)data completionHandler:(void (^)(id response, NSError *error))block;
and must be
- (void)send:(id )connection data:(NSString *)data connectionData:(NSString *)connectionData completionHandler:(void (^)(id response, NSError *error))block;
Like subclass does not have that implementation is calling superclass (SRHttpBasedTransport) method and for that reason you got "Request failed:bad request(400)" (is another http request and not websocket).
To fix just open the file SRWebSocketTransport.m in your Pods project and change the implementation, something like this:
- (void)send:(id)connection data:(NSString *)data connectionData:(NSString *)connectionData completionHandler:(void (^)(id response, NSError *error))block {
[_webSocket send:data];
if(block) {
block(nil,nil);
}
}
Hope this help.
pd: just checking github seems to be fixed in feature-2.0.0.beta1 branch