简体   繁体   English

iPhone App中的聊天客户端

[英]Chat client in iPhone App

If I create an application for iPhone, how can I get notified of chat messages I receive? 如果我为iPhone创建应用程序,如何收到收到的聊天消息的通知? Does receiving messages from the server happens through Push notification or Application has to poll to server in a regular time interval. 是否通过推送通知从服务器接收消息,还是应用程序必须在固定的时间间隔内轮询服务器。

I guess that for each time a new message comes the server would send a notification to the app, and once the app receives the notification, the app pulls the message from the server. 我想每次收到新消息时,服务器都会向应用程序发送通知,一旦应用程序收到通知,应用程序就会从服务器提取消息。

Is my understanding correct? 我的理解正确吗?

look up XMPP protocol/servers :) therein lies your answer. 在其中查找XMPP协议/服务器:)。

Theres a iPhone framework called XMPPFramework which will help. 有一个名为XMPPFramework的iPhone框架会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM