Chat app using XMPP protocol using gmail server
I am using iPhoneXMPP (xmppframework) code provided by code.google.com.
After entering jid, App received number of users who are online/offline.
And if anyone send message it received but cant send.
I am using below code to send msg but no popup chat displayed on my gmail account....
I do not understand what i did wrong....
NSXMLElement *body = [NSXMLElement elementWithName:@"body"];
[body setStringValue:textvalue];
NSXMLElement *message = [NSXMLElement elementWithName:@"message"];
[message addAttributeWithName:@"type" stringValue:@"chat"];
[message addAttributeWithName:@"to" stringValue:@"test123id@gmail.com"];
[message addChild:body];
[[self xmppStream] sendElement:message];
Thanks.....
The most likely issue is that the receiver does not have the sender on his/her roster. Google Talk requires you to have a presence subscription before sending messages.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.