Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does iOS keychain data survive an app reinstall?

I am new to iOS development and working on keychain storage. In my app, I would like to save some important information in iOS keychain (not shared keychain).

I don't know whether keychain data wipes out on app uninstall or not. I am looked at some blogs/stack overflow posts, but I didn't find any official apple documentation mentioning this specific information. I would like to know,

  1. Is my stored data deleted on app uninstall?
  2. What happens if user uninstall and immediately install app again? Will he get previously stored data?
like image 632
Kapil Avatar asked Dec 07 '25 14:12

Kapil


1 Answers

1. Is my stored data deleted on app uninstall? No, It will remain in keychain even after uninstallation. If you don't want you can get that behaviour with a little trick with use default to know if it's first installed or not.

What happens if the user uninstalls and immediately install app again? Will he gets previously-stored data? Only keychain data retain. Not the data in App Sandbox e.g user defaults, document directory, core data etc

like image 71
SuryaKantSharma Avatar answered Dec 10 '25 05:12

SuryaKantSharma