Integrate IndieBackup for snapshot backup and restore

Adds a local ZIP backup/restore of the iCloud document tree via the
IndieBackup package, surfaced in Settings with retention controls. A
restore suspends the sync observer, mirrors the files, then rebuilds the
SwiftData cache; opening a shared .workoutsbackup file restores it. The
engine exposes the container Documents root and a restore lifecycle
(isRestoring guards a concurrent connect), and the backup file type is
registered for open-in-place.

Claude-Session: https://claude.ai/code/session_01HJDQQDA9QdP8zByg43H5v3
This commit is contained in:
2026-07-08 08:03:30 -04:00
parent df3eac9d5f
commit 653cc65e0e
7 changed files with 190 additions and 1 deletions
+4
View File
@@ -22,6 +22,9 @@ packages:
IndieSync:
url: https://git.rzen.dev/rzen/indie-sync.git
from: "0.3.0"
IndieBackup:
url: https://git.rzen.dev/rzen/indie-backup.git
from: "2.0.0"
# Shared post-build phase — stamps CFBundleVersion (git commit count), BuildDate, and
# BuildHash into each target's (and dSYM's) Info.plist. Aliased into every code-bearing
@@ -62,6 +65,7 @@ targets:
dependencies:
- package: IndieAbout
- package: IndieSync
- package: IndieBackup
- target: Workouts Watch App
- target: Workouts Widget
embed: true