chore(ios): 添加LoginView并修复TokenStore类型与线程调度问题

- 在Xcode项目中添加LoginView.swift文件引用
- 修复TokenStore中Keychain查询字典类型为CFString
- 将DispatchQueue.main.async替换为MainActor.run,避免弱引用丢失
- 修复绑定设备信息时的线程安全与变量命名
This commit is contained in:
2026-08-03 20:51:16 +08:00
parent 5e369f14d9
commit da0a3bf59d
3 changed files with 18 additions and 11 deletions

View File

@@ -42,7 +42,7 @@ enum TokenStore {
static func clear() {
for k in [accessKey, refreshKey, userKey] {
let query: [String: Any] = [
let query: [CFString: Any] = [
kSecClass: kSecClassGenericPassword,
kSecAttrService: service,
kSecAttrAccount: k
@@ -55,7 +55,7 @@ enum TokenStore {
private static func save(key: String, value: String) {
//
let query: [String: Any] = [
let query: [CFString: Any] = [
kSecClass: kSecClassGenericPassword,
kSecAttrService: service,
kSecAttrAccount: key,
@@ -66,7 +66,7 @@ enum TokenStore {
}
private static func load(key: String) -> String? {
let query: [String: Any] = [
let query: [CFString: Any] = [
kSecClass: kSecClassGenericPassword,
kSecAttrService: service,
kSecAttrAccount: key,