feat: 更新依赖和项目配置,优化代码结构

- 在Package.swift中注释掉旧的swift-composable-architecture依赖,并添加swift-case-paths依赖。
- 在Podfile中将iOS平台版本更新至16.0,并移除QCloudCOSXML/Transfer依赖,改为使用QCloudCOSXML。
- 更新Podfile.lock以反映依赖变更,确保项目依赖的准确性。
- 新增架构分析需求文档,明确项目架构评估和改进建议。
- 在多个文件中实现async/await语法,提升异步操作的可读性和性能。
- 更新日志输出方法,确保在调试模式下提供一致的调试信息。
- 优化多个视图组件,提升用户体验和代码可维护性。
This commit is contained in:
edwinQQQ
2025-07-17 18:47:09 +08:00
parent 4bbb4f8434
commit 128bf36c88
46 changed files with 1250 additions and 1203 deletions

View File

@@ -12,10 +12,11 @@ import Security
/// -
/// - 线
/// - 访
@MainActor
final class KeychainManager {
// MARK: -
static let shared = KeychainManager()
@MainActor static let shared = KeychainManager()
private init() {}
// MARK: -
@@ -108,7 +109,7 @@ final class KeychainManager {
throw KeychainError.keychainOperationFailed(status)
}
debugInfo("🔐 Keychain 存储成功: \(key)")
debugInfoSync("🔐 Keychain 存储成功: \(key)")
}
/// Keychain Codable
@@ -137,7 +138,7 @@ final class KeychainManager {
// 4.
do {
let object = try JSONDecoder().decode(type, from: data)
debugInfo("🔐 Keychain 读取成功: \(key)")
debugInfoSync("🔐 Keychain 读取成功: \(key)")
return object
} catch {
throw KeychainError.decodingFailed(error)
@@ -176,7 +177,7 @@ final class KeychainManager {
switch status {
case errSecSuccess:
debugInfo("🔐 Keychain 更新成功: \(key)")
debugInfoSync("🔐 Keychain 更新成功: \(key)")
case errSecItemNotFound:
//
@@ -196,7 +197,7 @@ final class KeychainManager {
switch status {
case errSecSuccess:
debugInfo("🔐 Keychain 删除成功: \(key)")
debugInfoSync("🔐 Keychain 删除成功: \(key)")
case errSecItemNotFound:
//
@@ -231,7 +232,7 @@ final class KeychainManager {
switch status {
case errSecSuccess, errSecItemNotFound:
debugInfo("🔐 Keychain 清除完成")
debugInfoSync("🔐 Keychain 清除完成")
default:
throw KeychainError.keychainOperationFailed(status)
@@ -353,10 +354,10 @@ extension KeychainManager {
///
func debugPrintAllKeys() {
let keys = debugListAllKeys()
debugInfo("🔐 Keychain 中存储的键:")
debugInfoSync("🔐 Keychain 中存储的键:")
for key in keys {
debugInfo(" - \(key)")
debugInfoSync(" - \(key)")
}
}
}
#endif
#endif