如何在iPhone应用程序中实现谷歌聊天
我在网上搜索了很多,但找不到可以帮助我开始实现google chat的实际示例源代码,xmpp框架提供的示例代码也没有清楚地说明这一点,因为它有一个示例Mac 桌面应用程序项目。
借助 xmpp 框架中提供的示例项目(iphoneXmpp),我已经能够向所有在线/离线/离开的朋友展示,但它也没有告诉任何有关如何发起聊天的信息。
请向我提供任何示例源代码,以便我可以在我的应用程序中初始化谷歌聊天。
我真的被困住了。
提前致谢
i have searched a lot on the web but can not find the actual sample source code that can help me to get started for google chat implementation , the sample code provided with the xmpp framework also does not tell clearly about it, as it have a sample project of Mac desktop application.
I have been able to show all my friends who are online/ofline/away with the help of sample project(iphoneXmpp) which is provided in the xmppframework, but it also doest tell anything about how to initiate a chat.
Please provide me any sample source code so that i can initialize the google chat in my app.
i am really stuck.
thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
好吧,我没有放弃,在研究了 xmpp 框架的桌面应用程序并尝试将其包含在我的 iphone 应用程序中之后找到了一些解决方案。
这是在 gmail 上向我们的聊天朋友发送消息的代码。
在 didReceiveMessage 中,我有下面的代码...
我可以使用这两种方法发送/接收聊天,但问题是有时我从可用在线联系人(我们可以与之聊天)的表视图中选择的人的 ID 不收到消息,但任何其他人收到消息..
干杯!
okey i didnt give up and had some solution after looking into the desktop application of xmpp framework and tried to include it in my iphone app..
here is the code to send message to our chat friend on gmail..
and in didReceiveMessage , i have following code...
i'm able to send/recieve the chat using these two methods but problem is that some times the person's id which i selected from the table view of available online contacts(to whom we can chat with) does'nt receive the message but any other person receives the message..
Cheers!!
这对你来说非常有用,它还会提醒你谁正在发送消息以及谁想与你聊天,但是我只是陷入困境,我应该在哪里为我登录 iOS 的用户实现注销SDK。
This works great for you, and it will also give you the alert who is sending the message and who wants to chat with you, However I'm just stuck from where should I implement the Logout for the user through which I logged in to iOS SDK.
本教程应该可以解决这个问题: http ://mobile.tutsplus.com/tutorials/iphone/building-a-jabber-client-for-ios-server-setup/
This tutorial should do the trick : http://mobile.tutsplus.com/tutorials/iphone/building-a-jabber-client-for-ios-server-setup/