Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added containsAnymethod #493

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

nd-net
Copy link

@nd-net nd-net commented Jul 21, 2020

The contains method requires specific key to search. To simply check if any item is present in the keychain, use containsAny.

The method is motivated by the following use case:

  • I want to store a username-password pair in the keychain using TouchID/FaceID. The UI should present a button to retrieve the credentials from the keychain - but only if it contains at least one element.

The `contains` method requires specific key to search. To simply check if any item is present in the keychain, use `containsAny`.


public func contains(_ key: String, withoutAuthenticationUI: Bool = false) throws -> Bool {
return try self.contains(query:[AttributeAccount:key])
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nd-net you haven't passed withoutAuthenticationUI into base function

Repository owner deleted a comment from rangelsfr Nov 12, 2023
Repository owner deleted a comment from rangelsfr Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants