20 lines
611 B
Swift
20 lines
611 B
Swift
import Foundation
|
|
import LocalData
|
|
|
|
extension StorageKey where Value == String {
|
|
/// Stores the app version in standard UserDefaults.
|
|
/// - Domain: UserDefaults (standard)
|
|
/// - Security: None
|
|
/// - Sync: Automatic for small data
|
|
nonisolated static let appVersion = StorageKey(
|
|
name: "last_app_version",
|
|
domain: .userDefaults(suite: nil),
|
|
security: .none,
|
|
serializer: .json,
|
|
owner: "SampleApp",
|
|
description: "Tracks the last app version for migration and UI messaging.",
|
|
availability: .all,
|
|
syncPolicy: .automaticSmall
|
|
)
|
|
}
|