objective c - How to send message using XMPP Framework -


i creating chat application using xmpp framework in iphone. received messages not able send message. can 1 give me solution this??

- (void)sendmessage:(nsstring *)msgcontent {      nsstring *messagestr = textfield.text;      if([messagestr length] > 0)     {         nsxmlelement *body = [nsxmlelement elementwithname:@"body"];         [body setstringvalue:messagestr];          nsxmlelement *message = [nsxmlelement elementwithname:@"message"];         [message addattributewithname:@"type" stringvalue:@"chat"];         [message addattributewithname:@"to" stringvalue:[jid full]];         [message addchild:body];          [xmppstream sendelement:message];        } } 

use above code in chatviewcontroller ..it working fine me.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -