Update SecureStorgageSample
This commit is contained in:
parent
83e9e52876
commit
9ff9ddcb3d
@ -12,6 +12,7 @@ import LocalData
|
|||||||
struct SecureStorgageSampleApp: App {
|
struct SecureStorgageSampleApp: App {
|
||||||
init() {
|
init() {
|
||||||
_ = WatchConnectivityService.shared
|
_ = WatchConnectivityService.shared
|
||||||
|
StorageRouter.shared.registerCatalog(AppStorageCatalog.self)
|
||||||
Task {
|
Task {
|
||||||
await StorageRouter.shared.registerKeyMaterialProvider(
|
await StorageRouter.shared.registerKeyMaterialProvider(
|
||||||
ExternalKeyMaterialProvider(),
|
ExternalKeyMaterialProvider(),
|
||||||
|
|||||||
@ -3,24 +3,23 @@ import LocalData
|
|||||||
import SharedKit
|
import SharedKit
|
||||||
|
|
||||||
struct AppStorageCatalog: StorageKeyCatalog {
|
struct AppStorageCatalog: StorageKeyCatalog {
|
||||||
static var allKeys: [StorageKeyDescriptor] {
|
static var allKeys: [StorageKeyEntry] {
|
||||||
[
|
[
|
||||||
.from(StorageKeys.AppVersionKey(), serializer: .json),
|
StorageKeyEntry(StorageKeys.AppVersionKey()),
|
||||||
.from(StorageKeys.UserPreferencesKey(), serializer: .json),
|
StorageKeyEntry(StorageKeys.UserPreferencesKey()),
|
||||||
.from(StorageKeys.CredentialsKey(), serializer: .json),
|
StorageKeyEntry(StorageKeys.CredentialsKey()),
|
||||||
.from(StorageKeys.LastLocationKey(), serializer: .json),
|
StorageKeyEntry(StorageKeys.LastLocationKey()),
|
||||||
.from(StorageKeys.APITokenKey(), serializer: .json),
|
StorageKeyEntry(StorageKeys.APITokenKey()),
|
||||||
.from(StorageKeys.UserProfileFileKey(), serializer: .json),
|
StorageKeyEntry(StorageKeys.UserProfileFileKey()),
|
||||||
.from(StorageKeys.CachedDataKey(), serializer: .data),
|
StorageKeyEntry(StorageKeys.CachedDataKey()),
|
||||||
.from(StorageKeys.SettingsPlistKey(), serializer: .plist),
|
StorageKeyEntry(StorageKeys.SettingsPlistKey()),
|
||||||
.from(StorageKeys.SessionLogsKey(), serializer: .json),
|
StorageKeyEntry(StorageKeys.SessionLogsKey()),
|
||||||
.from(StorageKeys.PrivateNotesKey(), serializer: .json),
|
StorageKeyEntry(StorageKeys.PrivateNotesKey()),
|
||||||
.from(StorageKeys.ExternalSessionLogsKey(), serializer: .json),
|
StorageKeyEntry(StorageKeys.ExternalSessionLogsKey()),
|
||||||
.from(StorageKeys.WatchVibrationKey(), serializer: .json),
|
StorageKeyEntry(StorageKeys.WatchVibrationKey()),
|
||||||
.from(StorageKeys.SyncableSettingKey(), serializer: .json),
|
StorageKeyEntry(StorageKeys.SyncableSettingKey()),
|
||||||
.from(
|
StorageKeyEntry(
|
||||||
StorageKeys.ExternalKeyMaterialKey(keyName: "<dynamic>"),
|
StorageKeys.ExternalKeyMaterialKey(keyName: "<dynamic>"),
|
||||||
serializer: .data,
|
|
||||||
notes: "Key name is dynamic per external source."
|
notes: "Key name is dynamic per external source."
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user