문제

I've been searching for a good XMPP with chatroom tutorial. I found this tutorial helpful, but still no luck on implementing multi-user chat.

Can someone give me a good reference for this?

Thanks in advance.

도움이 되었습니까?

해결책

if you just follow this way, you can make the XMPP chat room. and you have to configure some settings about a room.

  • (void)xmppRoom:(XMPPRoom *)sender didConfigure:(XMPPIQ *)iqResult

this delegate method will be called ~ and you can set up what you want by XMPP - 045 document

    XMPPRoomMemoryStorage *roomMemory = [[XMPPRoomMemoryStorage alloc]init];

    roomID = [NSString stringWithFormat:@"%@@%@",_subjectOfRoom.text,szRoomName];
    XMPPJID *roomJID = [XMPPJID jidWithString:roomID];

    XMPPRoom *xmppRoom = [[XMPPRoom alloc]initWithRoomStorage:nil
                                                          jid:roomJID
                                                dispatchQueue:dispatch_get_main_queue()];

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

    [xmppRoom activate:[[JSXMPP_Singletone sharedInstanc]xmppStream]];

    [xmppRoom joinRoomUsingNickname:@"KIM"
                            history:nil
                           password:nil];
    [xmppRoom configureRoomUsingOptions:nil];
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top