Files
e-party-iOS/yana/Utils/Security/SigningKeyProvider.swift
edwinQQQ 8b4eb9cb7e feat: 更新API相关逻辑及视图结构
- 在Info.plist中新增API签名密钥配置。
- 将Splash视图替换为SplashV2,优化启动逻辑和用户体验。
- 更新API请求中的User-Agent逻辑,使用UserAgentProvider提供的动态值。
- 在APILogger中添加敏感信息脱敏处理,增强安全性。
- 新增CreateFeedPage视图,支持用户发布动态功能。
- 更新MainPage和Splash视图的导航逻辑,整合统一的AppRoute管理。
- 移除冗余的SplashFeature视图,提升代码整洁性和可维护性。
2025-09-17 16:37:21 +08:00

33 lines
1.2 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Foundation
/// API
/// - Info.plist `API_SIGNING_KEY`
/// - Debug 退
/// - Release
enum SigningKeyProvider {
/// Info.plist
private static let plistKey = "API_SIGNING_KEY"
///
static func signingKey() -> String {
if let key = Bundle.main.object(forInfoDictionaryKey: plistKey) as? String,
!key.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
return key
}
#if DEBUG
// Debug 退 Info.plist API_SIGNING_KEY
let legacy = "rpbs6us1m8r2j9g6u06ff2bo18orwaya"
debugWarnSync("⚠️ API_SIGNING_KEY 未配置Debug 使用历史回退密钥(请尽快配置 Info.plist")
return legacy
#else
debugErrorSync("❌ 缺少 API_SIGNING_KEY请在 Info.plist 中配置")
assertionFailure("Missing API_SIGNING_KEY in Info.plist")
return ""
#endif
}
}