Values that I Put in Keychain Can Be Saved After app is updated?
Asked Answered
T

3

7

I have an application in app-store. In My Application I use keychain to save some values(for example: name & surname) as crypted. If I use xCode to update my app , there is no problem about values. They are all saved in keychain as I want. But If I put new version into the app-store and updated my app with the version that is in appstore, My values are all gone :( Does iOS remove the values in keychain if app is updated ?

Tradesfolk answered 12/2, 2013 at 8:0 Comment(2)
Are you distributing the update with the same AppId, distribution certificate and provisioning profile or did something change?Thickknee
I didn't distribute the new version of app to the appstore because when i try to install new version with xCode MyValues were gone. If you ask whether profiles are different? Yes they are. Because firstly i installed from store and its with distribution profile, then I updated it with developer profile using xCode. I am afraid to publish my app like this because if values are gone my app is useless :(Tradesfolk
A
4

Note: On iPhone, Keychain rights depend on the provisioning profile used to sign your application. Be sure to consistently use the same provisioning profile across different versions of your application.

Check for more information Keychain Services Programming Guide

Autocade answered 12/2, 2013 at 11:10 Comment(5)
check my answer i am saying about provisioning profile not certificateAutocade
@Autocade in which condition keychain become reset ?Abrego
@Abrego - i am not getting you, can you please explain what you want to doAutocade
@Autocade suppose i do the factory reset my iphone and i istall new ios in my iphone then kaychain data will remove ?Abrego
@Autocade u there ?Abrego
H
1

The app's keychain shall not be removed or altered by any means during an update. If you experience this, you must be doing something wrong (see Joachim's questions above).

(Actually deleting the app did not remove its keychain in iOS 4.x, which should normally not happen. I haven't checked whether this was improved with later iOS versions, though.)

Besides, the keychain is not part of the application's filesystem, therefore an update shall not affect its contents. The keychain belongs to a central, secure database (actually it is a special sqlite3 DB). For more details check out the "Keychain Data Protection" chapter in Apple's iOS Security document: http://www.apple.com/ipad/business/docs/iOS_Security_Oct12.pdf .

As a conclusion: your app's keychain shall remain unchanged after an app update.

Hebephrenia answered 12/2, 2013 at 8:34 Comment(0)
B
1

Simple answer is NO. Your data stored in KeyChain is not removed when your app will be updated. You can get data from KeyChain using it's key-value pair.

Hope, this simple answer can help you.

Betatron answered 12/2, 2013 at 9:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.