Hi I a using the below code for registration. After xmppStream has been connected then I call this code inside didNotAuthenticate method: - (void)xmppStream:(XMPPStream *)sender didNotAuthenticate:(NSXMLElement *)error{ NSString *jidStr = @"mohit@localhost"; NSString password = @"mohit"; XMPPJID *jid = [XMPPJID jidWithString:jidStr]; [self xmppStream].myJID =jid; if (self.xmppStream.supportsInBandRegistration) { if (![self.xmppStream registerWithPassword:password error:&error]) { NSLog(@"Registration error: %@", error); } else{ NSLog(@"Registration on progress"); } } else { NSLog(@"Inband registration is not supported"); }} in Console it prints the "Registration on progress" but in the below delegate method - (void)xmppStream:(XMPPStream *)sender didNotRegister:(NSXMLElement *)error{ DDXMLElement *errorXML = [error elementForName:@"error"]; NSString *errorCode = [[errorXML attributeForName:@"code"] stringValue]; NSString *regError = [NSString stringWithFormat:@"ERROR :- %@",error.description]; NSLog(@"%@",regError);} It gives error:
I am using the ejabberd server. Please help me on this.
| |||||||||||||
add a comment |
1 Answer
up vote2down vote | Following steps worked for me
| ||||
add a comment |