2

I am working on the xmpp iOS chat client, I have developed application in which chat between two user are working fine. Now I want to load offline message for the user when he logs in the application. I want it when user go to the conversation screen with particular user. For example if A user receives message From B. And when user A login the app and start conversation with user B user A should see the old message also.

or if possible I would like to load the recent history from the server in xmpp iOS client.

If anyone has any link or document related xmpp framwork please let me know.

Keith OYS
  • 2,285
  • 5
  • 32
  • 38
Satish
  • 1,012
  • 2
  • 15
  • 32
  • You need to save all the received and sent message in CoreData or sqlite and then show them in their respective views. – Adil Soomro Sep 16 '13 at 06:40
  • Thanks for comment Adil Soomro, You mean all the conversation which is happening i need to store in device itself and show if user need its right? Is there any service from xmpp server which we can access to load this data instead of saving on the user device? – Satish Sep 16 '13 at 06:44
  • it depends on your xmpp server, by default xmpp server only save/log offline messages for users, when the users go online, all messages are delivered to relevant users. – Adil Soomro Sep 16 '13 at 06:47
  • 2
    You can do it in following manner, here is the code snippet for saving the chat history in core data: xmppMessageArchivingModule = [[XMPPMessageArchiving alloc] initWithMessageArchivingStorage:[XMPPMessageArchivingCoreDataStorage sharedInstance]]; [xmppMessageArchivingModule setClientSideMessageArchivingOnly:YES]; [xmppMessageArchivingModule activate:self.xmppStream]; [xmppMessageArchivingModule addDelegate:self delegateQueue:dispatch_get_main_queue()]; – Neeraj Khede Nov 18 '13 at 10:47
  • if you are looking for chat history i already give ans : http://stackoverflow.com/questions/14173251/retrieving-open-fire-message-archive-using-xmppframework-in-ios – Mitul Bhadeshiya Dec 14 '13 at 07:06
  • Were you able to get all offline messages that the user missed since he had closed the app? Please let me know how to acheive that. –  Aug 10 '14 at 07:10

0 Answers0