From 71d333090ef46e86990abd7ef2a0bd98fd1a085c Mon Sep 17 00:00:00 2001 From: Qiu Yuzhou Date: Fri, 23 Oct 2026 05:36:43 +0800 Subject: [PATCH] chore: suppress intentional classic keychain deprecation warnings --- ShadowsocksX-NG2/Domain/Credentials/MasterKeyStore.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ShadowsocksX-NG2/Domain/Credentials/MasterKeyStore.swift b/ShadowsocksX-NG2/Domain/Credentials/MasterKeyStore.swift index 63d2f000..41743277 100644 --- a/ShadowsocksX-NG2/Domain/Credentials/MasterKeyStore.swift +++ b/ShadowsocksX-NG2/Domain/Credentials/MasterKeyStore.swift @@ -51,6 +51,10 @@ struct KeychainCredentialKeyStore: CredentialKeyStoring { } } + @diagnose( + DeprecatedDeclaration, as: ignored, + reason: "经典登录钥匙串使用 SecAccess ACL 限制获准应用访问" + ) func create(_ data: Data, id: UUID, allowingInteraction: Bool) throws { try withClassicKeychainInteraction(allowingInteraction) { var application: SecTrustedApplication? @@ -90,6 +94,10 @@ struct KeychainCredentialKeyStore: CredentialKeyStoring { } /// 经典钥匙串使用进程级交互开关。同步调用结束后恢复原值,不把交互许可留给后台操作。 +@diagnose( + DeprecatedDeclaration, as: ignored, + reason: "经典登录钥匙串需要显式控制交互许可,并在同步操作结束后恢复原值" +) private func withClassicKeychainInteraction(_ allowed: Bool, _ operation: () throws -> T) throws -> T {