SecureStorageSample/SecureStorageSample/Services/AppStorageCatalog.swift
Matt Bruce f4a4f1a527 comments
Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
2026-01-17 12:18:05 -06:00

40 lines
1.3 KiB
Swift

import Foundation
import LocalData
import SharedKit
/// Catalog of all storage keys used by the sample app.
/// Registering a catalog allows LocalData to audit keys and run migrations up front.
struct AppStorageCatalog: StorageKeyCatalog {
var allKeys: [AnyStorageKey] {
// Order here is purely for readability in audit reports.
[
.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)
]
}
}