Search code examples
iphoneobjective-cios6

How to maintain chat history for multiple user?


I have developed one chat application and its working fine.Now I would like manage the chat history for particular user who send message to him.How to manage chat history?

Thanks


Solution

  • @Kiran, I think you will have an unique identifier(Thread ID) for every chat. You can use Core Data to store all the history.

    Just create a new attribute for "History" which will have Items of "Chat" Object.

    "Chat" object will also be an attribute, consisting "Name of Sender", "thread ID" and "Chat Message", "timeStamp", "Sender ID", "Reciever ID" etc as per your requirement.