iOS XMPP-Gruppenchat-Implementierung

Ich versuche, einen Chatroom mit robbiehanson XMPPframework zu erstellen.

Da ich keinen Beispielcode oder keine Dokumentation erhalten habe, habe ich selbst versucht, einen Chatroom wie folgt einzurichten:

    XMPPRoomMemoryStorage *rosterstorage = [[XMPPRoomMemoryStorage alloc] init];
    XMPPRoom *xmppRoom = [[XMPPRoom alloc] initWithRoomStorage:rosterstorage jid:[XMPPJID jidWithString:@"[email protected]/room"] dispatchQueue:dispatch_get_main_queue()];    
    [xmppRoom configureRoomUsingOptions:nil];
    [xmppRoom activate:[UIAppDelegate xmppStream]];
    [xmppRoom addDelegate:UIAppDelegate
            delegateQueue:dispatch_get_main_queue()];
   [xmppRoom inviteUser:[XMPPJID jidWithString:jabberID] withMessage:@"Hi join room"];

Aber ich erhalte die Antwort in der Konsole als:

 RECV: <message xmlns="jabber:client" from="[email protected]" to="[email protected]/42512304551337785705750233" type="error"><x xmlns="http://jabber.org/protocol/muc#user"><invite to="[email protected]"><reason>Hi join room</reason></invite></x><error code="503" type="cancel"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></message>

Jemand hat eine Idee, um MUC zu initiieren? Gibt es einen Beispielcode für diese? Jede Hilfe wird geschätzt. Vielen Dank im Voraus.

Antworten auf die Frage(3)

Ihre Antwort auf die Frage