how to create group and group chat with xmpp in ios

7,747 views
Skip to first unread message

patel...@gmail.com

unread,
Feb 23, 2013, 4:44:09 AM2/23/13
to xmppfr...@googlegroups.com
how to create group and group chat with xmpp in ios

Gene Crucean

unread,
Feb 23, 2013, 12:24:12 PM2/23/13
to xmppfr...@googlegroups.com
I'd love help in this department also (docs and info on the web are soo sparse)... but you are never going to get a worth while response with that kind of request.

What do you want to know specifically? How far have you already gotten? Have you tried anything... or are you just looking for someone to do the work for you?




On Sat, Feb 23, 2013 at 1:44 AM, <patel...@gmail.com> wrote:
how to create group and group chat with xmpp in ios

--
You received this message because you are subscribed to the Google Groups "XMPPFramework" group.
To unsubscribe from this group and stop receiving emails from it, 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/msg/xmppframework/-/FbAq_oq8Dv8J.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Gene Crucean - Emmy winning - Oscar nominated CG Supervisor / iOS-OSX Developer / Filmmaker / Photographer
** Freelance for hire **
www.genecrucean.com

~~ Please use my website's contact form on www.genecrucean.com for any personal emails. Thanks. I may not get them at this address. ~~

patel ppk

unread,
Feb 24, 2013, 12:42:48 AM2/24/13
to xmppfr...@googlegroups.com
Hey 
Thanks for your response.
Actually i am going to  develop  a project which has chat functionality.
I am already configure one to one chat functionality but i want group chat as well as file sharing using XMPP.
I would love to work with XMPP framework and its really helpful to develop chat related functionality.

Please help me.
Hopping for positive reply.
Thank You,
Prashant

rahul singh

unread,
Mar 4, 2013, 9:55:00 PM3/4/13
to xmppfr...@googlegroups.com
hey prashant

can you upload code for 1 -1 chat

i am struggling for that :(

my id  rahul...@gmail.com

Hardik Agile

unread,
Jul 5, 2013, 2:39:04 AM7/5/13
to xmppfr...@googlegroups.com
Hello all

I had make a group using follwing method
Note : this method must be in AppDelegate file

-(void)createGroup:(NSString*)groupName{
    @try {
        NSString *username=@"test";//[self.userDefault valueForKey:@"userid"];
       
        NSXMLElement *presenceElement=[NSXMLElement elementWithName:@"presence"];
       
        [presenceElement addAttributeWithName:@"type" stringValue:@"groupchat"];
       
        [presenceElement addAttributeWithName:@"from" stringValue:[NSString stringWithFormat:@"%@@%@",username,@"00.208.77.106"]];
       
        [presenceElement addAttributeWithName:@"to" stringValue:[NSString stringWithFormat:@"%@@conference.%@/%@",groupName,@"00.208.77.106",username]];
       
        NSXMLElement *xElement=[NSXMLElement elementWithName:@"x" xmlns:@"http://jabber.org/protocol/muc"];
       
        NSXMLElement *historyElement=[NSXMLElement elementWithName:@"history"];
       
        [xElement addChild:historyElement];
       
        [presenceElement addChild:xElement];
       
        [self.xmppStream sendElement:presenceElement];
    }
    @catch (NSException *exception) {

Kiran Khalkar

unread,
Jul 22, 2013, 11:49:57 PM7/22/13
to xmppfr...@googlegroups.com
Hello Hardik Agile ,

For creating group we need only your provided sample code, or any other configuration need for creating group? If yes Please share with us.


Cheers,

Kiran

Hardik Agile

unread,
Aug 7, 2013, 1:30:36 AM8/7/13
to xmppfr...@googlegroups.com
Hello Kiran.

For creating group you must need for openfire server where you can create your group dynamically via this code.

Kiran Khalkar

unread,
Aug 14, 2013, 5:20:26 AM8/14/13
to xmppfr...@googlegroups.com
Hello,
Thanks a lot...

I have done one to one and one to many chatting. Have any idea  about file transfer for video and image using xmpp for iOS.

Kiran

unread,
Aug 14, 2013, 5:26:29 AM8/14/13
to xmppfr...@googlegroups.com
Hello Prashant 

First you setup your host on xmpp.


For creating group :

  

    

    XMPPRoomCoreDataStorage *rosterstorage =[[XMPPRoomCoreDataStorage alloc] init];

    XMPPRoom *xmppRoom = [[XMPPRoom alloc] initWithRoomStorage:rosterstorage jid:[XMPPJID jidWithString:@"test@conference-kiran-desktop"] dispatchQueue:dispatch_get_main_queue()];   

    

    [xmppRoom activate:[[self appDelegate]xmppStream]];

    [xmppRoom joinRoomUsingNickname:@"Dev iphone" history:nil];

  

     [[[self appDelegate] xmppStreamaddDelegate:self delegateQueue:dispatch_get_main_queue()];

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

}

After this 

- (void)xmppRoomDidJoin:(XMPPRoom *)sender

{  configure your group

using below code...

 NSLog(@"[XMPPRoom] sendInstantRoomConfig:");

    

    

    

    NSString *groupName=[result stringByAppendingString:kChatHost];

    

    NSXMLElement *iq = [NSXMLElement elementWithName:@"iq"];

    

    [iq addAttributeWithName:@"id" stringValue:[NSString stringWithFormat:@"sdsdsd-kk%@",groupName]];

    [iq addAttributeWithName:@"to" stringValue:groupName];

    [iq addAttributeWithName:@"type" stringValue:@"set"];

    NSXMLElement *query = [NSXMLElement elementWithName:@"query" xmlns:XMPPMUCOwnerNamespaceName];

    


    NSXMLElement *xelem = [NSXMLElement elementWithName:@"x" xmlns:@"jabber:x:data"];

    [xelem addAttributeWithName:@"type" stringValue:@"submit"];

    

    [query addChild:xelem];

    [iq addChild:query];

    [[[self appDelegate] xmppStream] sendElement:iq];

Obaid Shaik

unread,
Aug 14, 2013, 5:26:36 AM8/14/13
to xmppfr...@googlegroups.com
How did you implemented one to many chatting?


--
You received this message because you are subscribed to the Google Groups "XMPPFramework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmppframewor...@googlegroups.com.
To post to this group, send email to xmppfr...@googlegroups.com.

Kun

unread,
Aug 15, 2013, 10:02:14 PM8/15/13
to xmppfr...@googlegroups.com
hi

from my experience last time, I did:
1. follow the example in the xmpp framework to have chat conference using stanzas that acknowledged by openfire server. This step include the logic to monitor the chat room and member lifetime in the chat-room and also the messages in/out.

2. maintain the UI Object instance in every time the chat conference created, since I have multiple chat conference together with other single chat. In my case I put the class field variable to identify what room of conference the instance belong to.

 Hopefully this will contribute :-)

regards
kun








Vishal Singh

unread,
Sep 16, 2013, 5:16:16 AM9/16/13
to xmppfr...@googlegroups.com
hello Kiran

Can you explain why we have to create a XMPPRoomCoreDataStorage object and set it as "RoomStorage" for the room?? How can I be able to listen to the below delegate

- (void)handlePresence:(XMPPPresence *)presence room:(XMPPRoom *)room;

- (void)handleIncomingMessage:(XMPPMessage *)message room:(XMPPRoom *)room;

- (void)handleOutgoingMessage:(XMPPMessage *)message room:(XMPPRoom *)room;


??

Obaid Shaik

unread,
Sep 16, 2013, 7:35:24 AM9/16/13
to xmppfr...@googlegroups.com
Check for the forum you there is a code already explained by some one I saw a month ago.


--
You received this message because you are subscribed to the Google Groups "XMPPFramework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmppframewor...@googlegroups.com.
To post to this group, send email to xmppfr...@googlegroups.com.

Vishal Singh

unread,
Sep 16, 2013, 7:50:57 AM9/16/13
to xmppfr...@googlegroups.com
Check for the forum you there is a code already explained by some one I saw a month ago.


Which forum you are talking about?? Sorry I am new to this so have no idea how to gather info. Could you help please?


On Mon, Sep 16, 2013 at 5:05 PM, Obaid Shaik <blue...@gmail.com> wrote:
Boxbe This message is eligible for Automatic Cleanup! (blue...@gmail.com) Add cleanup rule | More info

Check for the forum you there is a code already explained by some one I saw a month ago.
On Mon, Sep 16, 2013 at 12:16 PM, Vishal Singh <vishal.si...@gmail.com> wrote:

--
You received this message because you are subscribed to the Google Groups "XMPPFramework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmppframewor...@googlegroups.com.
To post to this group, send email to xmppfr...@googlegroups.com.

--
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/xBqSeM6uuz8/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.

ObjColumnist

unread,
Sep 16, 2013, 8:16:47 AM9/16/13
to xmppfr...@googlegroups.com
He just means this mailing list.

I believe the OS X sample app (in the Xcode folder) has multi user chat.

Spencer

Obaid Shaik

unread,
Sep 16, 2013, 8:20:49 AM9/16/13
to xmppfr...@googlegroups.com
I meant the googlgroups forum itself in xmppframework.. Search here itself.


Vishal Singh

unread,
Sep 16, 2013, 9:20:06 AM9/16/13
to xmppfr...@googlegroups.com
Thanks...I got it.


On Mon, Sep 16, 2013 at 5:50 PM, Obaid Shaik <blue...@gmail.com> wrote:
Boxbe This message is eligible for Automatic Cleanup! (blue...@gmail.com) Add cleanup rule | More info

I meant the googlgroups forum itself in xmppframework.. Search here itself.

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

--
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/xBqSeM6uuz8/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.

saranraj chinnamuniyappan

unread,
Sep 17, 2013, 8:25:35 AM9/17/13
to xmppfr...@googlegroups.com
Hi,

Have you got the solution to transfer the files in chat via XMPP server in iPhone? If so, please share the article or code. I need to build the similar app, currently struck with file transfer. 

Thanks in advance

Anand Prakash

unread,
Jan 22, 2014, 1:31:14 PM1/22/14
to xmppfr...@googlegroups.com
Hi all,

I am facing the same problem. I need to add chat option into my app, where a person who is signed in our app can chat with another signed In person. I have searched alot in Google...then i have got some frameworks (like sockets, XMPP/Jabber Client and Quick Blox etc. ) for chatter box. After reading tutorials i got that XMPP is more efficient way for chat things..I am very new for iPhone, if possible can you pls suggest me any tutorials or any sample code for 1-1 chat application using XMPP?

Any guide or any help would be highly appreciated..


Thanks.
Message has been deleted
Message has been deleted

Savita Sonawane

unread,
May 2, 2014, 3:56:53 AM5/2/14
to xmppfr...@googlegroups.com
Hey hie.. m working on 1 to 1 chat . how to add contacts in app using xmpp server? I am not geting the correct approach. will u please share ur code with me?


On Saturday, February 23, 2013 3:14:09 PM UTC+5:30, Patel prashant wrote:

Arimardan Singh

unread,
Jun 5, 2015, 4:23:24 AM6/5/15
to xmppfr...@googlegroups.com
Hello All Group Members

how to create group and group chat with using xmpp in ios?

I need to add chat option into my app, where a person who is signed in our app can chat with another signed In person. I have searched alots in Google...then i have got some frameworks (like XMPP/Jabber Client and Quick Blox etc. ) for chatter box. After reading  lot of tutorials, I have got that XMPP is more efficient way for chat things, if possible can you please suggest me any sample code and add participant friend to invite for multiple friend in for group chat application using XMPP? 


Any guide or any help would be highly appreciated.


I am not getting the correct approach. will u please share ur code with me?



Please help me.

Hopping for positive reply.

Thank You,

Summon Yang

unread,
Aug 25, 2015, 10:36:52 AM8/25/15
to XMPPFramework
https://github.com/SummonY/ComChat.
A free and open source instant messaging client for iOS based on
the XMPPFramework.

在 2013年2月23日星期六 UTC+8下午5:44:09,Patel prashant写道:

bintu akhil

unread,
Sep 2, 2015, 8:34:02 AM9/2/15
to XMPPFramework

Hi Patel Prashanth can you please send the one to one chat  I am struggling a lot and my mail id is bintu...@gmail.com

Thanks in Advance


Vishal Deshai

unread,
Nov 5, 2015, 12:07:13 AM11/5/15
to XMPPFramework
Hi Prashant, have you done one to one chat with XMPP?

Vishal Deshai

unread,
Nov 5, 2015, 12:07:45 AM11/5/15
to XMPPFramework
Hi Bintu, have you done one to one chat with XMPP?


On Wednesday, September 2, 2015 at 6:04:02 PM UTC+5:30, bintu akhil wrote:

vivek24...@gmail.com

unread,
Sep 3, 2016, 8:01:21 AM9/3/16
to XMPPFramework
Hello kiran ,,
i'm vivek and need your help in xmpp , so please ping me on 9993658870.

Dimple Bhavsar Panchal

unread,
Oct 1, 2016, 3:00:33 AM10/1/16
to XMPPFramework
Hi,

I want to get list of all the users who are available on server...
Just like users advanced search and search for * , in open fire.

I can get roster users. but can not get all the users.
Need help.

sai prasad Thagalapalli

unread,
May 26, 2017, 5:40:50 AM5/26/17
to XMPPFramework
hi Hardik.
I have 4 groups in my app and I am using XMPP, how  can  I implement the groups 

sai prasad Thagalapalli

unread,
May 26, 2017, 5:54:25 AM5/26/17
to XMPPFramework
hi vishal
please can you share the group chat code to my mail : saipras...@gmail.com

Vicky Dhas

unread,
Jun 12, 2017, 4:50:37 AM6/12/17
to XMPPFramework
Implement MUC Light on server and Client side for this:

 
https://mongooseim.readthedocs.io/en/latest/open-extensions/muc_light/

sai prasad Thagalapalli

unread,
Jun 12, 2017, 4:53:25 AM6/12/17
to xmppfr...@googlegroups.com
will you provide ios programming tutorial for me.
thank you. 

On Mon, Jun 12, 2017 at 2:20 PM, Vicky Dhas <vick...@gmail.com> wrote:
Implement MUC Light on server and Client side for this:

 
https://mongooseim.readthedocs.io/en/latest/open-extensions/muc_light/

--
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/xBqSeM6uuz8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xmppframework+unsubscribe@googlegroups.com.

To post to this group, send email to xmppfr...@googlegroups.com.

dayaka...@niveussolutions.com

unread,
Feb 5, 2018, 8:57:00 AM2/5/18
to XMPPFramework
Hi all,

Am trying to implement multi-user chat with Openfire and XMPPFramework combination, but unable to understand the flow of development(I have implemented the one-to-one chat it is working fine). Can anyone share group chat implementation code with (Explanation)implementation process for ios swift (Openfire and XMPPFramework combination). 




On Monday, June 12, 2017 at 2:23:25 PM UTC+5:30, sai prasad Thagalapalli wrote:
will you provide ios programming tutorial for me.
thank you. 
On Mon, Jun 12, 2017 at 2:20 PM, Vicky Dhas <vick...@gmail.com> wrote:
Implement MUC Light on server and Client side for this:

 
https://mongooseim.readthedocs.io/en/latest/open-extensions/muc_light/

--
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/xBqSeM6uuz8/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.
Reply all
Reply to author
Forward
0 new messages