All one-one chat is send with Message Type as Chat. Thus the Message Archiving technique (shown below) worked fine for me to save/retrieve chat history.
// Setup message archiving
xmppMessageArchivingStorage = [XMPPMessageArchivingCoreDataStorage sharedInstance];
xmppMessageArchiving = [[XMPPMessageArchiving alloc] initWithMessageArchivingStorage:xmppMessageArchivingStorage];
[xmppMessageArchiving setClientSideMessageArchivingOnly:YES];
// Activate xmpp modules
[xmppMessageArchiving activate:xmppStream];
// Add delegate
[xmppMessageArchiving addDelegate:self delegateQueue:dispatch_get_main_queue()];
However for Group Chat, the message type sent is "groupchat" This will not be archived by the XMPPMessageArchivingCoreDataStorage
Can someone please guide me as to how I can achieve the Message Archiving for Group Chat Message.