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:
commit
59e30cdd42
|
@ -320,6 +320,9 @@ public class Keychain {
|
||||||
private func setScope(query: inout [String: Any], context: String?) {
|
private func setScope(query: inout [String: Any], context: String?) {
|
||||||
if let accessGroup = accessGroup {
|
if let accessGroup = accessGroup {
|
||||||
query[kSecAttrAccessGroup as String] = accessGroup
|
query[kSecAttrAccessGroup as String] = accessGroup
|
||||||
|
#if os(macOS)
|
||||||
|
query[kSecUseDataProtectionKeychain as String] = true
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if let context = context {
|
if let context = context {
|
||||||
query[kSecAttrService as String] = context
|
query[kSecAttrService as String] = context
|
||||||
|
|
Loading…
Reference in New Issue