升级 AppStore 缓存 Key 并在覆盖安装时强制重新登录。

统一账号作用域 Key 对齐 Android,新增缓存 schema 迁移清理旧数据,并同步更新相关模块与单元测试。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-14 09:35:55 +08:00
parent 05804ba7d6
commit c083f1d4b3
31 changed files with 852 additions and 123 deletions

View File

@ -20,14 +20,16 @@ final class ProfileSpaceSettingsViewModelTests: XCTestCase {
defaults = UserDefaults(suiteName: "ProfileSpaceSettingsViewModelTests")!
defaults.removePersistentDomain(forName: "ProfileSpaceSettingsViewModelTests")
appStore = AppStore(defaults: defaults)
appStore.session.currentScenicId = 11
appStore.session.configureTestAccount(scenicId: 11)
AppStore.shared.logout()
AppStore.shared.session.configureTestAccount(userId: "profile-space-shared", scenicId: 11)
calendar = Calendar(identifier: .gregorian)
calendar.timeZone = TimeZone(secondsFromGMT: 0)!
fixedNow = calendar.date(from: DateComponents(year: 2026, month: 7, day: 8))!
}
override func tearDown() {
AppStore.shared.session.currentScenicId = 0
AppStore.shared.logout()
appStore.logout()
defaults.removePersistentDomain(forName: "ProfileSpaceSettingsViewModelTests")
super.tearDown()