XMPPFramework iOS lost messages when internet disconnection

I am working on chat based application using XMPPFramework and everything is working fine.

In order to avoid lost messages when sudden connection lost , I have implemented xmpptreamManagementMemoryStorage and xmppMessageDeliveryRecipts when XMPP connection is authenticated. Related delegate methods are called that show xmppStreamManagement is enabled and receiving stanza.

I am receiving receipt when the XMPP is connected to the server, however if the app is suddenly disconnected from the internet, some messages are not delivered (Precisely delegate method didReceiveXmppMessage is not called)

Please find below the delivery receipts and management storage code. (Called when XMPP connection is authenticated)

-(void)initXmppManagementMemoryStorage{

    //XEP - 0198
    if(!_xmppMemoryStorage){
        _xmppMemoryStorage   = [[XMPPStreamManagementMemoryStorage alloc] init];
    }

    if(!_xmppStreamManagment){
        _xmppStreamManagment = [[XMPPStreamManagement alloc] initWithStorage:_xmppMemoryStorage];
        [_xmppStreamManagment addDelegate:[ChatManager getSingleton] delegateQueue:dispatch_get_main_queue()];

        [_xmppStreamManagment activate:[ChatManager getSingleton].xmppStream];

        _xmppStreamManagment.autoResume = YES;
        _xmppStreamManagment.ackResponseDelay = 0.2;

        [_xmppStreamManagment requestAck];

        [_xmppStreamManagment automaticallyRequestAcksAfterStanzaCount:1 orTimeout:0];
        [_xmppStreamManagment automaticallySendAcksAfterStanzaCount:1 orTimeout:0];
        [_xmppStreamManagment enableStreamManagementWithResumption:YES maxTimeout:1];

        [_xmppStreamManagment sendAck];
        [[ChatManager getSingleton].xmppStream registerModule:_xmppStreamManagment];
    }
    [self initXmppMessageDeliveryRecipts];
}

-(void)initXmppMessageDeliveryRecipts{

    if(!_xmppMessageDeliveryRecipts){
        _xmppMessageDeliveryRecipts =[[XMPPMessageDeliveryReceipts alloc] initWithDispatchQueue:dispatch_get_main_queue()];
        _xmppMessageDeliveryRecipts.autoSendMessageDeliveryReceipts = true;
        _xmppMessageDeliveryRecipts.autoSendMessageDeliveryRequests = true;

        [_xmppMessageDeliveryRecipts addDelegate:self delegateQueue:dispatch_get_main_queue()];

        [_xmppMessageDeliveryRecipts activate:[ChatManager getSingleton].xmppStream];
     }

}