XMPP创建组未在iOS中获得响应



我尝试使用以下代码在此处给出的iOS中使用iOS中的XMPP框架创建一个新组

NSString *nickName=[NSString stringWithFormat:@"%@.nickName@conference.server.hostname.in" ,newGroupName ];
XMPPRoomMemoryStorage * roomMemory = [[XMPPRoomMemoryStorage alloc]init];
NSString* roomID = [NSString stringWithFormat:@"%@@conference.server.hostname.in" ,newGroupName ];
XMPPJID * roomJID = [XMPPJID jidWithString:roomID];
XMPPRoom* xmppRoom = [[XMPPRoom alloc] initWithRoomStorage:roomMemory jid:roomJID dispatchQueue:dispatch_get_main_queue()];
[xmppRoom activate:self.xmppStream];
[xmppRoom addDelegate:self delegateQueue:dispatch_get_main_queue()];
[xmppRoom joinRoomUsingNickname:nickName history:nil password:nil];

我确实在上面指定的线程中所说的配置

[xmppRoom fetchConfigurationForm];

但是没有回答该方法

- (void)xmppRoomDidCreate:(XMPPRoom *)sender{
    DDLogVerbose(@"%@: %@", THIS_FILE, THIS_METHOD);
}

或者什至没有呼叫来使用此方法。这意味着没有创建小组,对吗?在日志中没有显示错误或没有任何错误。

请告诉我我犯了什么错误,或者如果还有更多与此有关的事情。

预先感谢:D

以这种方式进行。这是在Swift

    let roomStorage: XMPPRoomMemoryStorage = XMPPRoomMemoryStorage()
    let roomJID: XMPPJID = XMPPJID.jidWithString("chatRoom10@conference.localhost")
    let xmppRoom: XMPPRoom = XMPPRoom(roomStorage: roomStorage,
        jid: roomJID,
        dispatchQueue: dispatch_get_main_queue())
    xmppRoom.activate(SKxmpp.manager().xmppStream)
    xmppRoom.addDelegate(self, delegateQueue: dispatch_get_main_queue())
    //xmppRoom.configureRoomUsingOptions(nil)
    xmppRoom.joinRoomUsingNickname(SKxmpp.manager().xmppStream.myJID.user, history: nil, password: nil)
    xmppRoom.fetchConfigurationForm()

最新更新