evgenyneu/keychain-swift

Feature request: Add getAll() and getAllKeys()

AnthonyOliveri opened this issue · 4 comments

There are two new methods for KeychainSwift that would be very useful to my iOS app:

  1. getAll(), which retrieves all key/value pairs stored in the keychain, returned as [String: Any]
  2. getAllKeys(), which does the same as getAll() but only retrieves the keys with return type [String]

I've already implemented these in my fork, and tried them out in my app where they work just fine. All I would need is to add documentation and another test or two, and then I could open a PR that adds these methods.

Thanks for the proposal, @AnthonyOliveri. I don't want to add new features to this library (for the reason explained here). However, these two methods could be added if they are small. Could you share a link to the code in your fork or paste the code here?

Here they are: AnthonyOliveri@ab5b2e4. I don't think the functionality for getting all keychain items is possible to do with the existing API, hence the new methods.

@AnthonyOliveri thanks. Nah, I think this is too much code for our library. I want to keep it bare. I'm sure there are other libraries out there with this feature. Sorry. :)

I understand