Can the values ​​that I add to the keychain be saved after updating the application?

I have an application in the app store. In my application, I use keychain to store some values ​​(for example: first and last name) as encrypted. If I use xCode to update my application, there is no problem with the values. They are all stored in key chains as I want. But if I put the new version in the application store and updated my application with the version located in the appstore, all my values ​​disappeared :( iOS deletes the values ​​in the keychain if the application is updated?

+6
source share
3 answers

Note On iPhone, keyring rights depend on the provisioning profile used to sign your application. Remember to consistently use the same provisioning profile across different versions of your application.

Check Additional Information Keychain Key Programming Guide

+4
source

The application keychain should not be deleted or altered by any means during the update. If you experience this, you must do something wrong (see Joachim Questions above).

(In fact, uninstalling the application did not remove its keychain in iOS 4.x, which usually should not happen. However, I did not check if this was improved with later versions of iOS.)

In addition, the keychain is not part of the application file system, so the update should not affect its contents. The keychain belongs to a central, secure database (in fact, it is a special sqlite3 database). For more information, see the “Key Data Protection” chapter in the Apple iOS Security document: http://www.apple.com/ipad/business/docs/iOS_Security_Oct12.pdf .

As a conclusion: your application keychain will remain unchanged after updating the application.

+1
source

The simple answer is NO. Your data stored in KeyChain will not be deleted when your application is updated. You can get data from KeyChain using a key-value pair.

Hope this simple answer can help you.

+1
source

All Articles