evgenyneu / keychain-swift

Helper functions for saving text in Keychain securely for iOS, OS X, tvOS and watchOS.
MIT License
2.82k stars 345 forks source link

Deletes all Keychain items used by the app. #70

Open slavasemeniuk opened 6 years ago

slavasemeniuk commented 6 years ago

Hey. I like your framework and i'm wondering why 'clear()' method deletes all items regardless of the prefix. I know that it's described in the documentation but it's gonna be good feature i guess. Was it done with this way because of some issues?

I can create PR if you don't mind.

Thank you.

evgenyneu commented 6 years ago

Hi @slavasemeniuk, good question. The clear method is supposed to clear everything. If you personally need to clear items starting with the prefix, I would suggest creating a separate method named clearPrefixed. Feel free to submit a pull request if you want to do it.