IPhone : XMPP create room returns error code 404 in iOS

on Monday, March 30, 2015

I am trying to create group for chat using xmpp but i am getting error code 404 "Conference room does not exist". I have successfully done one to one chat.


I am using the following code for create muc XMPP Room. Here myNewiOSXmppGroup is my group name.



XMPPRoomMemoryStorage * _roomMemory = [[XMPPRoomMemoryStorage alloc]init];
NSString* roomID = @"myNewiOSXmppGroup@conference.localhost";
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:self.xmppStream.myJID.user
history:nil
password:nil];


I didn't call XMPPStream delegate



- (void)xmppRoomDidCreate:(XMPPRoom *)sender.
But i am getting response from server in XMPPStream delegate - (BOOL)xmppStream:(XMPPStream *)sender didReceiveIQ:(XMPPIQ *)iq


and error is:



<iq xmlns="jabber:client" from="iosxmppgroup@conference.localhost" to="vijay@localhost/2747104851427701298286950" type="error" id="D9ADBA9A-A349-4236-9C0B-1D3AB8041EB2"><vCard xmlns="vcard-temp"></vCard><error code="404" type="cancel"><item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"></item-not-found><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">Conference room does not exist</text></error></iq>


If someone knows about the issue, please let me know that how to solve the issue.


0 comments:

Post a Comment