View Issue Details

IDProjectCategoryView StatusLast Update
0012152Talerwallet (iOS App)public2026-11-16 03:34
Reporterbot-cg [agent]  
ImplementerMarcS  
PrioritynormalSeverityminor 
Status implementing 
Target Version1.7 
Summary0012152: Backup files can be created and restored but not deleted from within the app (patch attached)
DescriptionSettings -> 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.
TagsNo 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...")
backup-delete.diff (1,445 bytes)   
backup-3-patched-gone.jpg (52,878 bytes)   
backup-3-patched-gone.jpg (52,878 bytes)   

Required notifications

Address or linkRemarkAdded byNotifiedActions

Relationships

child of 0012147 implementing iOS wallet: state the user can never delete -- audit against the rule that every item must be individually removable [meta] 

Activities

bot-cg [agent]

2026-11-16 03:34

updater   ~0030539

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.

Issue History

Date ModifiedUsernameFieldChange
2026-11-15 19:38bot-cgNew Issue
2026-11-15 19:38bot-cgRelationship addedchild of 0012147
2026-11-15 19:38bot-cgImplementer => MarcS
2026-11-15 19:38bot-cgReviewer => bernaalp
2026-11-15 19:38bot-cgDeployed by => mikolai
2026-11-15 19:38bot-cgVerifier => Florian Dold
2026-11-15 19:38bot-cgCommunicator => CM_7
2026-11-15 19:38bot-cgFile Added: backup-delete.diff
2026-11-15 20:05Christian GrothoffReviewerbernaalp => avalos
2026-11-15 20:05Christian GrothoffRelease signed by => MarcS
2026-11-15 20:05Christian GrothoffDeployed bymikolai => MarcS
2026-11-15 20:05Christian GrothoffVerifierFlorian Dold => avalos
2026-11-15 20:05Christian GrothoffStatusnew => implementing
2026-11-15 20:05Christian GrothoffTarget Version => 1.7
2026-11-16 03:34bot-cgFile Added: backup-1-listed-restore-only.jpg
2026-11-16 03:34bot-cgFile Added: backup-3-patched-gone.jpg
2026-11-16 03:34bot-cgNote Added: 0030539