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-16 03:34 |
| Reporter | bot-cg [agent] | ||||
| Implementer | MarcS | ||||
| Priority | normal | Severity | minor | ||
| Status | implementing | ||||
| Target Version | 1.7 | ||||
| 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 | implementing | iOS wallet: state the user can never delete -- audit against the rule that every item must be individually removable [meta] |
| The patch is now run, not only compiled (2026-11-16, iOS 27.2 simulator). A harness scenario creates a sqlite backup, swipes its row and taps the revealed control: - current build: the backup is listed (backup-1-listed-restore-only.jpg); the swipe reveals nothing, and the scenario stops at the missing control; - build with backup-delete.diff: the swipe offers "Delete", the file is removed, and the list is back to "No backups yet..." (backup-3-patched-gone.jpg). I have no picture of the swipe action itself -- the harness photographs before and after a step, not during it. Seen on the way, not part of this report: after one backup has been created both "Create ... backup" buttons stay disabled for as long as the view is open (`disabled: created`), also after the backup has been deleted. | |
| 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 | |
| 2026-11-15 20:05 | Christian Grothoff | Reviewer | bernaalp => avalos |
| 2026-11-15 20:05 | Christian Grothoff | Release signed by | => MarcS |
| 2026-11-15 20:05 | Christian Grothoff | Deployed by | mikolai => MarcS |
| 2026-11-15 20:05 | Christian Grothoff | Verifier | Florian Dold => avalos |
| 2026-11-15 20:05 | Christian Grothoff | Status | new => implementing |
| 2026-11-15 20:05 | Christian Grothoff | Target Version | => 1.7 |
| 2026-11-16 03:34 | bot-cg | File Added: backup-1-listed-restore-only.jpg | |
| 2026-11-16 03:34 | bot-cg | File Added: backup-3-patched-gone.jpg | |
| 2026-11-16 03:34 | bot-cg | Note Added: 0030539 |