Wire KeychainDelegate before DataManager init to fix token persistence
TokenManager.keychainDelegate was never set, so all Keychain reads/writes failed silently. Tokens couldn't be persisted or loaded on app restart, and TokenStorage.getToken() returned nil during task completion flows. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,10 @@ struct iOSApp: App {
|
|||||||
init() {
|
init() {
|
||||||
UITestRuntime.configureForLaunch()
|
UITestRuntime.configureForLaunch()
|
||||||
|
|
||||||
|
// Set Keychain delegate BEFORE DataManager.initialize() so token can be
|
||||||
|
// loaded from Keychain on startup (Kotlin/Native can't use SecItem* directly)
|
||||||
|
TokenManager.Companion.shared.keychainDelegate = KeychainHelper.shared
|
||||||
|
|
||||||
// Initialize DataManager with platform-specific managers
|
// Initialize DataManager with platform-specific managers
|
||||||
// This must be done before any other operations that access DataManager
|
// This must be done before any other operations that access DataManager
|
||||||
DataManager.shared.initialize(
|
DataManager.shared.initialize(
|
||||||
|
|||||||
Reference in New Issue
Block a user