This source project is a dollars real-time chat client application source code, the source code is relatively simple, I hope this case can help you learn and use.
SOURCE Download: http://code.662p.com/view/6725.html
An Instant Message Client by XMPP on IPhone
The chat tool on the iphone implemented with XMPP.
Only a small subset of the functionality is completed.
Login and registration;
Get a list of contacts;
Add friends;
Accept friends;
Chat with friends;
Get a list of multi-person chat rooms;
Join the room;
In the room many people chat;
Modify a person's status; directory structure
/drrr: Encapsulates the XMPP Framework for specific functions;
/dollarss: Implement iphone Client interface;
/xmppframework
Project Dependencies
Xmppframework: Only use the core function, extensions only use the reconnect;
The project itself does not use coredata;
Arc not supported;
DRRR consists of several major parts
Link
Drrrmanager: A single instance, obtained through [Drrrmanager Sharedmanager], used to manage and Jaber the server's links, send XML data, etc. Drrrmanager is used by various other function modules.
News:
Drrrmessagecontent: An entry for a message, corresponding to Xmppmessage
Drrrmessage: The entire list of messages, including a list of conversations with each contact (chat room), Drrrmessage is a single instance, obtained through [Drrrmessage Sharedmessage], Inside him is a messagebundle nsdictionary, the Jid of the chat is Key,value is the list of dialogue content, the list is each message, namely drrrmessagecontent; Received friend invitations and room invitations are also a message content; Send a message via drrrmessage.
Contact
Drrrroster: is the entire contact list, he is a single instance, obtained through [Drrrroster Sharedroster]. Through Drrrroster to get contact information, modify the status of the current logged on user, subscribe to and accept the contact invitation;
Drrrrostermember: a contact entry;
Chat room
Drrrchatroommanager: A single instance, obtained through [Drrrchatroommanager Sharedchatroommanager], he is responsible for the management of the chat room functions of each specific operation;
Drrrchatroom: A room that corresponds to a chat room, including a member list memberlist, and room information chatroominfo;
Drrrchatroominfo: A chat room information, including a Nsarray features, and Nsdictionary's fields;
Each value in the fields in Drrrchatroominfofield:drrrchatroominfo is a drrrchatroominfofield, and the result is only for the data format returned by XMPP;
Drrrchatroommember: A chat room member, including characters, status, etc.;
Detailed Description: http://ios.662p.com/thread-1628-1-1.html
Dollars Instant Chat client application source code