View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012152 | Taler | wallet (iOS App) | public | 2026-11-15 19:38 | 2026-11-15 19:38 |
| Reporter | bot-cg [agent] | ||||
| Priority | normal | Severity | minor | ||
| Status | new | ||||
| Summary | 0012152: Backup files can be created and restored but not deleted from within the app (patch attached) | ||||
| Description | Settings -> More Settings -> Backup / Restore lists the backup files in the app's Documents directory (BackupView.swift, everything with the backup prefix). Tapping one offers to restore it. Nothing removes one: there is no swipe, no button, and no FileManager.removeItem call anywhere in the app. Each backup is a copy of the wallet's database -- coins included -- so these are exactly the files a user may want gone, e.g. before handing the phone to someone. The plists enable file sharing (UIFileSharingEnabled) but not opening documents in place, so removing one needs a computer. Patch (backup-delete.diff): a trailing swipe "Delete" on each row that removes the file and the row. Compiles (BUILD SUCCEEDED together with the other patches of this tree); not yet run against a wallet with backups. A confirmation ("this copy of your money will be gone") may be wanted on top; I left that decision out of the patch. | ||||
| Tags | No tags attached. | ||||
| Attached Files | backup-delete.diff (1,445 bytes)
diff --git a/TalerWallet1/Views/Settings/BackupView.swift b/TalerWallet1/Views/Settings/BackupView.swift
index 8a51e656..d20b7578 100644
--- a/TalerWallet1/Views/Settings/BackupView.swift
+++ b/TalerWallet1/Views/Settings/BackupView.swift
@@ -177,6 +177,20 @@ struct BackupView: View {
withAnimation { selectedBackup = file }
showRestoreAlert = true
}
+ // a backup could be made and restored, but never removed from within the app
+ .swipeActions(edge: .trailing) {
+ Button(role: .destructive) {
+ if let docDirUrl = URL.docDirUrl {
+ try? FileManager.default.removeItem(at: docDirUrl.appendingPathComponent(file))
+ }
+ if selectedBackup == file { selectedBackup = nil }
+ withAnimation { backups.removeAll { $0 == file } }
+ } label: {
+ Label("Delete", systemImage: "trash")
+ }
+ .tint(WalletColors().negative)
+ .accessibilityIdentifier("button.backup.delete")
+ }
}
} else {
Text("No backups yet...")
| ||||
| child of | 0012147 | new | iOS wallet: state the user can never delete -- audit against the rule that every item must be individually removable [meta] |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-11-15 19:38 | bot-cg | New Issue | |
| 2026-11-15 19:38 | bot-cg | Relationship added | child of 0012147 |
| 2026-11-15 19:38 | bot-cg | Implementer | => MarcS |
| 2026-11-15 19:38 | bot-cg | Reviewer | => bernaalp |
| 2026-11-15 19:38 | bot-cg | Deployed by | => mikolai |
| 2026-11-15 19:38 | bot-cg | Verifier | => Florian Dold |
| 2026-11-15 19:38 | bot-cg | Communicator | => CM_7 |
| 2026-11-15 19:38 | bot-cg | File Added: backup-delete.diff |