Open josefrm opened 9 years ago
Note i've already changed the dispatcher on #16 but cannot emit the message (just 1 emit works) working iOS 8
What i have is 1 emit to assign the user id to socket id (this is working) and 1 emit to send the message to a specific user (this is not)
And both work perfectly in server.
, thanks
On iOS8 - My app has become dead after updating to latest SIOSocket!! Neither am I able to send emit nor am I able to receive server call back. Old version had its own issues. Some times the client calls weren't reaching the server and vice versa due to continuous connect and disconnect cycles. Has any one implemented apps successfully on iOS using SIOSocket? Need help...
@anuradhavasudeva Have you been able to resolve it? In my case, UI get halted. No further interaction is possible except to kill the app and re-run. :(
I solved it, the problem is we trying to dispatch the events to the main queue the #16 explains how to fix it
Hello there, im having some issue there if i open the explorer all of the emit methods works like a charm, but in iOS not.
Any idea why is that happening, some of code here:
Server:
io.on('connection', function(socket) { ClientsArray.push(new function () { this.userid = ""; this.socketid = socket.id; });
});
Objective C: +(ConexionSocket)sharedModel { static ConexionSocket ConexionCompartida = nil; if(!ConexionCompartida) ConexionCompartida = [[ConexionSocket alloc] init]; return ConexionCompartida; }
-(void)IniciarConexion { [SIOSocket socketWithHost: @"http://104.236.96.130:9000/" response: ^(SIOSocket *socket) { SocketS = socket; id _c = cliente; SocketS.onConnect = ^() { [_c OnSocketConnection]; };
}
-(void)enviarMensaje: (NSString)mensaje MensajeTraducido: (NSString)mensajeTraducido To:(id)to From:(id)from { [SocketS emit:@"chat message" args:@[[NSString stringWithFormat:@"%@;-:-;%@;-:-;%@;-:-;%@",from, to,mensaje, mensajeTraducido]]]; }
-(void)enviarmensajeConfirmacion: (id)idUsuario { @try { NSArray Arr = [NSArray arrayWithObjects:idUsuario, nil]; [SocketS emit:@"id cliente" args:Arr]; } @catch (NSException exception) { NSLog(@"Error %@", exception); } @finally {
} }