From 9ff9ddcb3d449a49877f9cd66ce0cb0f33292140 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Wed, 14 Jan 2026 10:46:12 -0600 Subject: [PATCH] Update SecureStorgageSample --- .../SecureStorgageSampleApp.swift | 1 + .../Services/AppStorageCatalog.swift | 31 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/SecureStorgageSample/SecureStorgageSampleApp.swift b/SecureStorgageSample/SecureStorgageSampleApp.swift index 1f07d15..c14a9b9 100644 --- a/SecureStorgageSample/SecureStorgageSampleApp.swift +++ b/SecureStorgageSample/SecureStorgageSampleApp.swift @@ -12,6 +12,7 @@ import LocalData struct SecureStorgageSampleApp: App { init() { _ = WatchConnectivityService.shared + StorageRouter.shared.registerCatalog(AppStorageCatalog.self) Task { await StorageRouter.shared.registerKeyMaterialProvider( ExternalKeyMaterialProvider(), diff --git a/SecureStorgageSample/Services/AppStorageCatalog.swift b/SecureStorgageSample/Services/AppStorageCatalog.swift index 3906f7a..34996bd 100644 --- a/SecureStorgageSample/Services/AppStorageCatalog.swift +++ b/SecureStorgageSample/Services/AppStorageCatalog.swift @@ -3,24 +3,23 @@ import LocalData import SharedKit struct AppStorageCatalog: StorageKeyCatalog { - static var allKeys: [StorageKeyDescriptor] { + static var allKeys: [StorageKeyEntry] { [ - .from(StorageKeys.AppVersionKey(), serializer: .json), - .from(StorageKeys.UserPreferencesKey(), serializer: .json), - .from(StorageKeys.CredentialsKey(), serializer: .json), - .from(StorageKeys.LastLocationKey(), serializer: .json), - .from(StorageKeys.APITokenKey(), serializer: .json), - .from(StorageKeys.UserProfileFileKey(), serializer: .json), - .from(StorageKeys.CachedDataKey(), serializer: .data), - .from(StorageKeys.SettingsPlistKey(), serializer: .plist), - .from(StorageKeys.SessionLogsKey(), serializer: .json), - .from(StorageKeys.PrivateNotesKey(), serializer: .json), - .from(StorageKeys.ExternalSessionLogsKey(), serializer: .json), - .from(StorageKeys.WatchVibrationKey(), serializer: .json), - .from(StorageKeys.SyncableSettingKey(), serializer: .json), - .from( + StorageKeyEntry(StorageKeys.AppVersionKey()), + StorageKeyEntry(StorageKeys.UserPreferencesKey()), + StorageKeyEntry(StorageKeys.CredentialsKey()), + StorageKeyEntry(StorageKeys.LastLocationKey()), + StorageKeyEntry(StorageKeys.APITokenKey()), + StorageKeyEntry(StorageKeys.UserProfileFileKey()), + StorageKeyEntry(StorageKeys.CachedDataKey()), + StorageKeyEntry(StorageKeys.SettingsPlistKey()), + StorageKeyEntry(StorageKeys.SessionLogsKey()), + StorageKeyEntry(StorageKeys.PrivateNotesKey()), + StorageKeyEntry(StorageKeys.ExternalSessionLogsKey()), + StorageKeyEntry(StorageKeys.WatchVibrationKey()), + StorageKeyEntry(StorageKeys.SyncableSettingKey()), + StorageKeyEntry( StorageKeys.ExternalKeyMaterialKey(keyName: ""), - serializer: .data, notes: "Key name is dynamic per external source." ) ]