Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>

This commit is contained in:
Matt Bruce 2026-01-14 11:41:40 -06:00
parent 6ce652e606
commit e76b724a16
2 changed files with 5 additions and 3 deletions

View File

@ -10,7 +10,7 @@ This app provides interactive demos for all LocalData storage options:
|-----|------|----------------|
| **Defaults** | Save/load/remove values | UserDefaults |
| **Keychain** | Secure credentials with biometrics | Keychain |
| **Files** | User profiles with AnyCodable | File System |
| **Files** | User profiles with Codable models | File System |
| **Encrypted** | Encrypted logs (AES or ChaCha20) | Encrypted File System |
| **Sync** | Platform availability & sync policies | Multiple |
@ -52,6 +52,7 @@ SecureStorgageSample/
│ └── Platform/
├── WatchOptimized.swift # Watch data models
├── Services/
│ ├── AppStorageCatalog.swift
│ ├── ExternalKeyMaterialProvider.swift
│ └── WatchConnectivityService.swift
└── Views/
@ -63,8 +64,6 @@ SecureStorgageSample/
SecureStorageSample Watch App/
├── SecureStorageSampleApp.swift
├── ContentView.swift
├── Models/
│ └── UserProfile.swift
├── Protocols/
│ └── WatchDataHandling.swift
├── State/
@ -113,6 +112,8 @@ The app demonstrates various storage configurations:
- The shared model/constants live in `SharedPackage` (`SharedKit`) to keep the watch/iOS data contract centralized.
- The watch app uses a handler-based WatchConnectivity layer so new payload types can be added in `Services/Handlers` without bloating the main service.
- A `StorageKeyCatalog` sample is included to generate a security audit report of all storage keys.
- Each `StorageKey` includes a `description` used in audit reports.
- The catalog is registered at app startup to enforce key registration and catch duplicates.
## License

View File

@ -2,6 +2,7 @@ import Foundation
import LocalData
import SharedKit
struct AppStorageCatalog: StorageKeyCatalog {
static var allKeys: [AnyStorageKey] {
[