Update SecureStorgageSample
This commit is contained in:
parent
31a85b3b22
commit
3ef0bdfa34
@ -10,7 +10,7 @@ This app provides interactive demos for all LocalData storage options:
|
|||||||
|-----|------|----------------|
|
|-----|------|----------------|
|
||||||
| **Defaults** | Save/load/remove values | UserDefaults |
|
| **Defaults** | Save/load/remove values | UserDefaults |
|
||||||
| **Keychain** | Secure credentials with biometrics | Keychain |
|
| **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 |
|
| **Encrypted** | Encrypted logs (AES or ChaCha20) | Encrypted File System |
|
||||||
| **Sync** | Platform availability & sync policies | Multiple |
|
| **Sync** | Platform availability & sync policies | Multiple |
|
||||||
|
|
||||||
@ -52,6 +52,7 @@ SecureStorgageSample/
|
|||||||
│ └── Platform/
|
│ └── Platform/
|
||||||
├── WatchOptimized.swift # Watch data models
|
├── WatchOptimized.swift # Watch data models
|
||||||
├── Services/
|
├── Services/
|
||||||
|
│ ├── AppStorageCatalog.swift
|
||||||
│ ├── ExternalKeyMaterialProvider.swift
|
│ ├── ExternalKeyMaterialProvider.swift
|
||||||
│ └── WatchConnectivityService.swift
|
│ └── WatchConnectivityService.swift
|
||||||
└── Views/
|
└── Views/
|
||||||
@ -63,8 +64,6 @@ SecureStorgageSample/
|
|||||||
SecureStorageSample Watch App/
|
SecureStorageSample Watch App/
|
||||||
├── SecureStorageSampleApp.swift
|
├── SecureStorageSampleApp.swift
|
||||||
├── ContentView.swift
|
├── ContentView.swift
|
||||||
├── Models/
|
|
||||||
│ └── UserProfile.swift
|
|
||||||
├── Protocols/
|
├── Protocols/
|
||||||
│ └── WatchDataHandling.swift
|
│ └── WatchDataHandling.swift
|
||||||
├── State/
|
├── 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 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.
|
- 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.
|
- 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
|
## License
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import Foundation
|
|||||||
import LocalData
|
import LocalData
|
||||||
import SharedKit
|
import SharedKit
|
||||||
|
|
||||||
|
|
||||||
struct AppStorageCatalog: StorageKeyCatalog {
|
struct AppStorageCatalog: StorageKeyCatalog {
|
||||||
static var allKeys: [AnyStorageKey] {
|
static var allKeys: [AnyStorageKey] {
|
||||||
[
|
[
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user