I am implementing a chat application. I want to transfer a file but I keep getting TURN Connection failed! I am using the below code:
XMPPJID *jid = [XMPPJID jidWithString:@"user@krishanyadav.local/resourceID"] ;
TURNSocket *turnSocket = [[TURNSocket alloc] initWithStream:[self xmppStream] toJID:jid];
[turnSockets addObject:turnSocket];
[TURNSocket setProxyCandidates:@[JABBER_DOMAIN_NAME, JABBER_DOMAIN_NAME]];
[turnSocket startWithDelegate:self delegateQueue:dispatch_get_main_queue()];
- (void)turnSocket:(TURNSocket *)sender didSucceed:(GCDAsyncSocket *)socket {
NSLog(@"TURN Connection succeeded!");
NSLog(@"You now have a socket that you can use to send/receive data to/from the other person.");
[turnSockets removeObject:sender];}
- (void)turnSocketDidFail:(TURNSocket *)sender {
NSLog(@"TURN Connection failed!");
[turnSockets removeObject:sende
}
how can I transfer the file using iOS xmpp jabber2 server.
NOTE: I am able to send a file from Audim to iMessage messenger (from and to each other) from the server.