【发布时间】:2014-11-19 18:57:31
【问题描述】:
我正在使用 xmpp jabber 客户端实现群聊。我正在使用以下代码成功创建组。
-(void) CreateRoom {
XMPPRoomMemoryStorage *roomStorage = [[XMPPRoomMemoryStorage alloc] init];
XMPPJID *roomJID = [XMPPJID jidWithString:[NSString stringWithFormat:@"NewGroup@conference.%@",JABBER_DOMAIN_NAME]];
XMPPRoom *xmppRoom = [[XMPPRoom alloc] initWithRoomStorage:roomStorage jid:roomJID dispatchQueue:dispatch_get_main_queue()];
[xmppRoom activate:appDelegate.xmppStream];
[xmppRoom addDelegate:self
delegateQueue:dispatch_get_main_queue()];
[xmppRoom joinRoomUsingNickname:appDelegate.xmppStream.myJID.user
history:nil
password:nil];
}
- (void)xmppRoomDidCreate:(XMPPRoom *)sender
{
NSLog(@"xmppRoomDidCreate");
}
- (void)xmppRoomDidJoin:(XMPPRoom *)sender
{
NSLog(@"xmppRoomDidJoin");
[sender fetchConfigurationForm];
[sender inviteUser:[XMPPJID jidWithString:@"Test1"] withMessage:@"Greetings!"];
[sender inviteUser:[XMPPJID jidWithString:@"Test2"] withMessage:@"Greetings!"];
}
所以请建议我如何加入用户获取现有组的列表以进行进一步实施.. 谢谢,
【问题讨论】:
标签: ios iphone xmpp chat xmppframework