я отправить запрос на IQ, но я не получаю правильный result.The назад IQ ошибкаXMPP не удается получить Реестры IOS
<error code="403" type="auth"><forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error>
Мой код:
- (void)queryRoster {
NSXMLElement *query = [NSXMLElement elementWithName:@"query" xmlns:@"jabber:iq:roster"];
NSXMLElement *iq = [NSXMLElement elementWithName:@"iq"];
XMPPJID *myJID = self.stream.myJID;
[iq addAttributeWithName:@"from" stringValue:@"[email protected]"];
[iq addAttributeWithName:@"to" stringValue:@"127.0.0.1"];
[iq addAttributeWithName:@"id" stringValue:@"1993"];
[iq addAttributeWithName:@"type" stringValue:@"get"];
[iq addChild:query];
[self.stream sendElement:iq];
}
Спасибо, но я использую сервер openfire –