[英]Chat app using XMPP protocol using gmail server
Chat app using XMPP protocol using gmail server 使用Gmail服务器使用XMPP协议的聊天应用
I am using iPhoneXMPP (xmppframework) code provided by code.google.com. 我正在使用code.google.com提供的iPhoneXMPP(xmppframework)代码。
After entering jid, App received number of users who are online/offline. 输入jid后,App收到了在线/离线用户数。
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.... 我正在使用以下代码发送味精,但我的gmail帐户上没有显示任何弹出式聊天。...
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. Google Talk要求您先进行状态订阅,然后再发送消息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.