How to create a Persistent room in XMPP using XMPPRoom in iPhone

1,778 views
Skip to first unread message

Nehaa Saxena

unread,
Aug 29, 2013, 5:23:23 AM8/29/13
to xmppfr...@googlegroups.com
I've created all the functionality for muc. But the room I've created they are anonymous. I need to set the feature to persistent when creating

dobbs

unread,
Aug 29, 2013, 5:44:18 AM8/29/13
to xmppfr...@googlegroups.com
in the

- (void)xmppRoomDidCreate:(XMPPRoom *)sender

you have to create a configuration object (for me I used NSXMLElement) and pass it as a parameter in

[sender configureRoomUsingOptions:roomOptionsXML];

Here is the content of the roomOptionsXML:

<iq type="set" to="myro...@jabber.muc.com" id="B169E688-706D-4D5F-830C-8FC7AD8E7C78">
    <query xmlns="http://jabber.org/protocol/muc#owner">
    <x xmlns="jabber:x:data" type="submit">
        <field type="hidden" var="FORM_TYPE">
            <value>http://jabber.org/protocol/muc#roomconfig</value>
        </field>
        <field type="boolean" var="muc#roomconfig_persistentroom">
            <value>1</value>
        </field>
        <field type="text-single" var="muc#roomconfig_roomname">
            <value>XMPPFrameWork</value>
        </field>
    </x>
</query>
</iq>

Hope this helps.

Nehaa Saxena

unread,
Sep 4, 2013, 4:34:54 AM9/4/13
to xmppfr...@googlegroups.com
Thanks Dobbs.


Now i'm having one issue that whenever i killed my app, i don't know from where it lefts the room. So if user left the room it will not exist. What i want is whenever the user kills the app he/she will not leave the room.

Please help me for the above issue

Thanks
Nehaa


--
You received this message because you are subscribed to a topic in the Google Groups "XMPPFramework" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xmppframework/1Q2iN1Qu69c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xmppframewor...@googlegroups.com.
To post to this group, send email to xmppfr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xmppframework/bbc6de1f-5b4a-4a98-9be3-646e8a394eec%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Vishal Singh

unread,
Sep 16, 2013, 10:02:11 AM9/16/13
to xmppfr...@googlegroups.com
Maybe you can create the same room every time you launch your application. Like you can show the name of the room, no matter if the room exists or not, if it already exists then you will enter that room, if it does not exist, it will get created and you will enter it. 

Chanchal Gupta

unread,
Dec 20, 2013, 12:47:09 AM12/20/13
to xmppfr...@googlegroups.com
Hi Dobbs

I need to list group names (joined or created) as well as the users I have recently chat with. with XMPPRoster I only get the buddy list, no clue on how to get groups? any help would be really appreciable.

Thanks

dobbs

unread,
Dec 21, 2013, 6:32:35 AM12/21/13
to xmppfr...@googlegroups.com
Hi Chanchal,

As for the group names, I assume you wanted to show the rooms you recently joined.  I believe that this is not possible using XMPPRoster.  What I would suggest is to keep/store the JID of the rooms that you have previously joined then automatically join them after logging in.  The other approach can be done by making changes to the xmpp server.  You will have to customize the behavior of the server itself.  I know that this is not much help but that's the only thing I can think of.

Sanjay Bhansali

unread,
Jul 17, 2017, 3:19:04 AM7/17/17
to XMPPFramework
Hey @Neha Saxena have you got any answer for left the group automatically in xmpp when you killed the app.
Reply all
Reply to author
Forward
0 new messages