-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emit work on explorer not in iOS 8 #46
Comments
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 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
{
}
}
The text was updated successfully, but these errors were encountered: