ios
ios copied to clipboard
Remote wipe function not working
Remote wipe does not work on accounts. Might be a server issue. Also, currently account AND DB are deleted, when it should be only account.
For reference:
NextcloudKit.shared.getRemoteWipeStatus(serverUrl: tableAccount.urlBase, token: token, account: tableAccount.account) { account, wipe, _, error in
var finalError: NKError?
if wipe {
appDelegate.deleteAccount(account) // delete account, don't delete database
finalError = NKError(errorCode: NCGlobal.shared.errorInternalError, errorDescription: "_wipe_account_")
} else if UIApplication.shared.applicationState == .active && NextcloudKit.shared.isNetworkReachable() {
appDelegate.deleteAccount(account) // delete account, delete database
finalError = NKError(errorCode: error.errorCode, errorDescription: "_error_check_remote_user_")
}