Ios 将用户添加到xmpp组或muc中

Ios 将用户添加到xmpp组或muc中,ios,objective-c,iphone,ios8,xmpp,Ios,Objective C,Iphone,Ios8,Xmpp,我想向组中添加4个成员(他们已经是oprefire中的用户)。 我想在没有用户许可或未发送邀请的情况下添加它们 现在,我正在使用以下代码邀请用户: [sender inviteUser:[XMPPJID jidWithString:@"keithoys"] withMessage:@"Greetings!"]; 是否有其他方法实现此目的?当用户向其他用户发送请求时,将调用以下委托方法: -(void)xmppMUC:(XMPPMUC *)sender roomJID:(XMPPJID *)ro

我想向组中添加4个成员(他们已经是oprefire中的用户)。 我想在没有用户许可或未发送邀请的情况下添加它们

现在,我正在使用以下代码邀请用户:

[sender inviteUser:[XMPPJID jidWithString:@"keithoys"] withMessage:@"Greetings!"];

是否有其他方法实现此目的?

当用户向其他用户发送请求时,将调用以下委托方法:

-(void)xmppMUC:(XMPPMUC *)sender roomJID:(XMPPJID *)roomJID didReceiveInvitation:(XMPPMessage *)message{

    roomMemoryStorage = [[XMPPRoomMemoryStorage alloc] init];
    xmppRoom = [[XMPPRoom alloc]
                initWithRoomStorage:roomMemoryStorage
                                jid:roomJID
                      dispatchQueue:dispatch_get_main_queue()];

    [xmppRoom activate:[self xmppStream]];

    [xmppRoom addDelegate:self delegateQueue:dispatch_get_main_queue()];

    //Now add user to the group directly without prompting them
    [xmppRoom joinRoomUsingNickname:[xmppStream myJID].user history:nil];
}

我只写了代码,如果您需要解释,我将。

Hello@the_UB的可能副本,如何从roomMemoryStorage检索数据?为什么要检索数据?我必须在tableView中显示房间列表(用户是其所有者或成员)。然后我必须在聊天屏幕上显示消息历史记录。就像我们对单用户聊天所做的那样。我被这件事难住了。请建议我如何从核心数据中保存和检索数据。