Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keychain data lost after updating the app on iOS

I am saving some data in the keychain, but after each application update that data are lost. The same problem I have when I save something in the user defaults. This is important because I use it to store created a unique identifier. What can be wrong? Thanks for any tips.

like image 664
Bartosz Bialecki Avatar asked Dec 03 '12 09:12

Bartosz Bialecki


2 Answers

I had the same issue with our latest app. What we found out is that Apple apparently is wiping the data from Keychain for pre iOS 8 apps if the newer app has minimum supported version of 8.0. However if the minimum supported version is set to iOS 7.0, the Keychain data is not wiped off.

So apparently all apps using Keychain will face this issue when they set the minimum supported version to iOS 8.0 and push to AppStore.

like image 101
Junaid EC Avatar answered Sep 17 '22 01:09

Junaid EC


Loss in keychain data may be due to change in the keychain-access-groups entitlement.

Keeping the same value for this key in old and new apps will solve the issue.

like image 35
vesirak Avatar answered Sep 19 '22 01:09

vesirak