sameerkapps / SecureStorage

119 stars 32 forks source link

Deleting the App doesn't delete the Saved Entries from Mobile in iOS #17

Closed Binaryraja closed 6 years ago

Binaryraja commented 7 years ago

Deleting the App doesn't delete the Saved Entries from Mobile in iOS. Is this expected?

sameerkapps commented 6 years ago

Yes. That is expected. When a user uninstalls an app, iOS does not delete the data stored in the keychain. It also does not invoke any part of the app. So the data stored in the Keychain remains unchanged and it is available to the app the next time it is installed. This is applicable to any app irrespective of it uses this package or not. Way to handle is to have a settings"firstTimeRun" in User Defaults and erase the data on the first run. Sample in Swift and Objective C is here https://stackoverflow.com/questions/4747404/delete-keychain-items-when-an-app-is-uninstalled

Binaryraja commented 6 years ago

Thanks.. Will look into it.