Manage User Account

Send Feedback/Contact Us Info#

To send feedback information from the user, you can call the below method.

    ContactManager.shared.sendContactUsInfo(title: title, description: description) { isSuccess, error, data in
    }
    ArgumentTypeDescription
    titleStringtitle for the feedback
    descriptionStringdetailed info about the feedback
    CALLBACKFlyCompletionHandlerFlyCompletionHandler used as completion Handler

    Logout of Chat SDK#

    To logout of the chat SDK call the below method.

      ChatManager.logoutApi { isSuccess, error, data in
      }
      ArgumentTypeDescription
      CALLBACKFlyCompletionHandlerFlyCompletionHandler used as completion Handler

      Delete My Account#

      To delete your chat account call the below method. This will clear your profile,login information and messages(including media files) in the server as well as in your device. No information will be retained after account deletion. And if registration is made again with the same account it will be treated as a new account.

        ContactManager.shared.deleteMyAccountRequest(REASON, FEEDBACK) { isSuccess, flyError, flyData in
        var data = flyData
        print(data.getMessage() as! String )
        if isSuccess {
        // Clear necessary data and redirect to login page
        } else{
        // Show error in UI
        }
        }
        ArgumentTypeDescription
        REASONStringReason for the account deletion
        FEEDBACKStringFeedback for tha app if any
        CALLBACKFlyCompletionHandlerFlyCompletionHandler used as completion Handler
        caution

        Once account is deleted the user will be removed from every group in which is he/her is a participant.

        Delete SDK data#

        To delete/clear sdk's local data like database and user defaults call the below method.

          ChatManager.shared.resetSDKData()
          caution

          Calling this method will clear all the table in sdk's database and the preference maintained in sdk using user defaults which can't be restored once deleted.