From dcc6ea6f6b3923ce8a5e0884db6574b3fedd7863 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 16 Jan 2026 21:58:41 -0600 Subject: [PATCH] Update SecureStorageSample --- .../Services/AppStorageCatalog.swift | 50 +++++++++---------- .../Migration/AggregatingMigrationKeys.swift | 6 +-- .../StorageKeys/Migration/MigrationKeys.swift | 2 +- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/SecureStorageSample/Services/AppStorageCatalog.swift b/SecureStorageSample/Services/AppStorageCatalog.swift index e3fb24b..8828a43 100644 --- a/SecureStorageSample/Services/AppStorageCatalog.swift +++ b/SecureStorageSample/Services/AppStorageCatalog.swift @@ -6,31 +6,31 @@ import SharedKit struct AppStorageCatalog: StorageKeyCatalog { var allKeys: [AnyStorageKey] { [ - .key(StorageKey.appVersion), - .key(StorageKey.userPreferences), - .key(StorageKey.credentials), - .key(StorageKey.lastLocation), - .key(StorageKey.apiToken), - .key(StorageKey.userProfileFile), - .key(StorageKey.cachedData), - .key(StorageKey.settingsPlist), - .key(StorageKey.sessionLogs), - .key(StorageKey.privateNotes), - .key(StorageKey.externalSessionLogs), - .key(StorageKey.watchVibration), - .key(StorageKey.syncableSetting), - .key(StorageKey.externalKeyMaterial), - .key(StorageKey.appGroupUserDefaults), - .key(StorageKey.appGroupUserProfile), - .key(StorageKey.legacyMigrationSource), - .key(StorageKey.modernMigrationDestination), - .key(StorageKey.legacyProfileName), - .key(StorageKey.modernProfileName), - .key(StorageKey.legacyNotificationSetting), - .key(StorageKey.legacyThemeSetting), - .key(StorageKey.modernUnifiedSettings), - .key(StorageKey.legacyAppMode), - .key(StorageKey.modernAppMode) + .key(.appVersion), + .key(.userPreferences), + .key(.credentials), + .key(.lastLocation), + .key(.apiToken), + .key(.userProfileFile), + .key(.cachedData), + .key(.settingsPlist), + .key(.sessionLogs), + .key(.privateNotes), + .key(.externalSessionLogs), + .key(.watchVibration), + .key(.syncableSetting), + .key(.externalKeyMaterial), + .key(.appGroupUserDefaults), + .key(.appGroupUserProfile), + .key(.legacyMigrationSource), + .key(.modernMigrationDestination), + .key(.legacyProfileName), + .key(.modernProfileName), + .key(.legacyNotificationSetting), + .key(.legacyThemeSetting), + .key(.modernUnifiedSettings), + .key(.legacyAppMode), + .key(.modernAppMode) ] } } diff --git a/SecureStorageSample/StorageKeys/Migration/AggregatingMigrationKeys.swift b/SecureStorageSample/StorageKeys/Migration/AggregatingMigrationKeys.swift index 6e07883..de595e2 100644 --- a/SecureStorageSample/StorageKeys/Migration/AggregatingMigrationKeys.swift +++ b/SecureStorageSample/StorageKeys/Migration/AggregatingMigrationKeys.swift @@ -28,6 +28,7 @@ extension StorageKey where Value == String { } extension StorageKey where Value == UnifiedSettings { + nonisolated static let modernUnifiedSettings = StorageKey( name: "modern_unified_settings", domain: .fileSystem(directory: .documents), @@ -39,10 +40,9 @@ extension StorageKey where Value == UnifiedSettings { syncPolicy: .never, migration: { key in let sources: [AnyStorageKey] = [ - .key(StorageKey.legacyNotificationSetting), - .key(StorageKey.legacyThemeSetting) + .key(.legacyNotificationSetting), + .key(.legacyThemeSetting) ] - return AnyStorageMigration( DefaultAggregatingMigration( destinationKey: key, diff --git a/SecureStorageSample/StorageKeys/Migration/MigrationKeys.swift b/SecureStorageSample/StorageKeys/Migration/MigrationKeys.swift index a0ee227..6febd08 100644 --- a/SecureStorageSample/StorageKeys/Migration/MigrationKeys.swift +++ b/SecureStorageSample/StorageKeys/Migration/MigrationKeys.swift @@ -31,7 +31,7 @@ extension StorageKey where Value == String { AnyStorageMigration( SimpleLegacyMigration( destinationKey: key, - sourceKey: .key(StorageKey.legacyMigrationSource) + sourceKey: .key(.legacyMigrationSource) ) ) }