learning_ai_clock/ios/ChronoMind/Shared/Cloud/KeychainHelper.swift
saravanakumardb1 d1b4534b22 refactor(ios): migrate Cloud/ files to ByteLystPlatformSDK — eliminate duplicated platform code
Replaced standalone implementations with thin wrappers over shared SDK:
- KeychainHelper → delegates to BLKeychain (53→27 lines)
- TelemetryService → delegates to BLTelemetryClient (139→55 lines)
- FeatureFlagService → delegates to BLFeatureFlagClient (72→39 lines)
- AuthService → delegates to BLAuthClient (359→171 lines)
- project.yml → added ByteLystPlatformSDK local package dependency

Total: 623 lines of duplicated code → 292 lines of thin wrappers.
PlatformSyncManager kept as-is (product-specific timer DTOs).
All existing call-site APIs preserved — zero breaking changes.
2026-02-28 22:12:37 -08:00

27 lines
853 B
Swift

// Keychain Helper
// Thin wrapper over ByteLystPlatformSDK's BLKeychain.
// Keeps the existing call-site API (KeychainHelper.save/read/delete)
// while delegating to the shared implementation.
import Foundation
import ByteLystPlatformSDK
enum KeychainHelper {
private static let service = "com.saravana.chronomind"
@discardableResult
static func save(key: String, value: String) -> Bool {
BLKeychain.save(service: service, key: key, value: value)
}
static func read(key: String) -> String? {
BLKeychain.read(service: service, key: key)
}
@discardableResult
static func delete(key: String) -> Bool {
BLKeychain.delete(service: service, key: key)
}
}