Backup and Restore

Backup and Restore is a feature which allows users to backup the chats and able to restore chats.

Backup your chat#

Whenever you need to backup your chat messages, you can use the below method to start backup. The method will backup all the chats and writes to a file. Once backup completed you can get the backup file path from the backupDidFinish callback delegate.

    BackupManager.shared.startBackup()
    ArgumentTypeDescription
    CallbackBackupEventDelegateBackup progress and completeion
    info

    The backup progress and completion callback BackupEventDelegate.

    Note : To check if message is available use this method BackupManager.shared.checkIfMessageAvailable().

    Restore from a backup file#

    Whenever you need to restore the chat messages from the backup file, you can use the below method.

      BackupManager.shared.restoreMessages(URL)
      ArgumentTypeDescription
      URLURLBackup file local path url
      CallbackRestoreEventDelegateRestore progress and completeion
      info

      The backup progress and completion callback RestoreEventDelegate.