Merge pull request #200 from roop/access_password_ref_in_macos

macOS: Enable accessing a password reference without system prompt
This commit is contained in:
Davide De Rosa 2021-02-12 01:09:28 +01:00 committed by GitHub
commit 59e30cdd42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -320,6 +320,9 @@ public class Keychain {
private func setScope(query: inout [String: Any], context: String?) {
if let accessGroup = accessGroup {
query[kSecAttrAccessGroup as String] = accessGroup
#if os(macOS)
query[kSecUseDataProtectionKeychain as String] = true
#endif
}
if let context = context {
query[kSecAttrService as String] = context