I have a problem with the XMPP-Framework for iOS. Each time I run the registerWithPassword method, I get an error message:
"Domain Error = XMPPStreamErrorDomain Code = 1" Wait while the stream is connected. "UserInfo = 0xad7c300 {NSLocalizedDescription = Wait until the stream is connected.}"
In my code, the following steps:
-(void)createUserWithUsername:(NSString*)name andPW:(NSString*)pw{ [self setupStream]; NSLog(@"name: %@ ",name); NSString *nameFor = name; [self disconnect]; NSString *jidBenutzer = [NSString stringWithFormat:@"%@@my-Server.com",nameFor]; NSError *error = nil; NSError * err = nil; NSLog(@"jabberid : %@",jidBenutzer); XMPPJID *jid = [XMPPJID jidWithString:jidBenutzer]; self.xmppStream.myJID = jid; [[self xmppStream] registerWithPassword:pw error:&err]; NSLog(@"Connection: %@",error); NSLog(@"Register: %@",err); }
I hope you help me!
source share