jrendel / SwiftKeychainWrapper

A simple wrapper for the iOS Keychain to allow you to use it in a similar fashion to User Defaults. Written in Swift.
MIT License
1.59k stars 339 forks source link

Remove the Keychain data on App uninstalling. #110

Closed tushar666 closed 5 years ago

tushar666 commented 6 years ago

Guys i want to erase all the stored value from Keychain once the app is uninstalled.

edward-sentongo commented 6 years ago

That can't be done. Once user wants to install app, you get no call backs notifying you about uninstall

NikKovIos commented 5 years ago

Use UserDefaults instead.

marcus604 commented 5 years ago

In my app delegate I check if the app has been run before. If not then I attempt to delete the item I store in the keychain.

While this doesn't remove it on uninstall it does ensure that when run the first time its not going to encounter any previous data

jrendel commented 5 years ago

As has been mentioned, this cannot be done automatically, but there are some options to handle clearing it on the next re-install and first run as @marcus604 mentioned.