Migrate from iOS 17 Observation to iOS 16-compatible Combine architecture.
Lower deployment target to iOS 16, replace @Observable with ObservableObject, add navigation and UI compatibility shims, and include login smoke UI tests. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
22
suixinkan/App/AppUITestLaunchState.swift
Normal file
22
suixinkan/App/AppUITestLaunchState.swift
Normal file
@ -0,0 +1,22 @@
|
||||
//
|
||||
// AppUITestLaunchState.swift
|
||||
// suixinkan
|
||||
//
|
||||
// Created by Codex on 2026/6/26.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
/// UI 测试启动状态清理,仅在测试进程显式传入启动参数时执行。
|
||||
enum AppUITestLaunchState {
|
||||
static let resetArgument = "-suixinkan-ui-tests-reset-state"
|
||||
|
||||
static func resetIfNeeded(arguments: [String] = ProcessInfo.processInfo.arguments) {
|
||||
guard arguments.contains(resetArgument) else { return }
|
||||
|
||||
try? SessionTokenStore().clear()
|
||||
AccountSnapshotStore().clear()
|
||||
let preferences = AppPreferencesStore()
|
||||
preferences.clear()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user