v1.7.2
Safety-net release on top of v1.7.1. Even though v1.7.1 fixed the data-loss bug, v1.7.2 adds an automatic backup of your SwiftData store and an "App Update Mode" recovery screen so that a future breaking migration can never silently wipe your data again. If migration ever fails, your library, saves, BIOS, cheats, and settings are restored from a timestamped backup and the app launches into a limited mode that lets you install a fixing update.
Highlights
- Automatic pre-migration backup: Before opening the SwiftData store, v1.7.2 copies the SQLite triple (
TruchiEmu.sqlite,-wal,-shm) to~/Library/Application Support/TruchiEmu/.migrationBackups/with a timestamp. At most 5 recent backups are kept. - Rollback on failure: If a schema migration fails, the app restores the most recent pre-migration backup to the live store path, so the next (fixing) release opens your original library instead of an empty store.
- App Update Mode: When the store cannot be opened, the app presents a locked-down screen offering a one-tap update check, Time Machine, a limited-mode continue, and quit — your data is always reported as intact.
- In-memory fallback: The UI stays functional even when the on-disk store is unavailable, so the recovery screen can render.
Detailed Changes
- Added
SwiftDataContainer.makePreMigrationBackup()andrestoreLatestBackup()(backup/restore of the SQLite triple with pruning of old backups) - Added
launchSchemaError,createdPreMigrationBackup, andrunningInMemoryFallbackstate to surface migration failures - Revised the
ModelContainerinit failure path: on error, restore the backup then fall back to an in-memory store — no destructive deletes - Added
AppUpdateModeViewand wired it as the first view whenlaunchSchemaError != nil, with an.exitAppUpdateModenotification to dismiss - Removed the now-unused
deleteStoreFiles()(its delete-and-retry path was removed from the failure handler) - Added
updateMode.*localization keys (en/es/pt)