Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
254 views
in Technique[技术] by (71.8m points)

Will items in iOS keychain survive app uninstall and reinstall?

I am looking for documentation about the iOS keychain items. My specific question is if keychain items will survive an app uninstall and reinstall cycle. It seems to work that way since iOS 4 (or maybe even iOS 3), but I cannot find any documentation from Apple stating that this actually is supposed to work this way.

What I am trying to figure out is if I can TRUST (not "hope for" or "guess") that items in the keychain will survive the app uninstall.

EDIT: I realize that the question is a bit unclear as pointed out by Daij-Djan. What I am looking for is official documentation that backs up the well-known behaviour.

UPDATE 2017-04-04: See my answer below, the behaviour change in iOS 10.3 beta. It works as usual in iOS 10.3 but may probably change in future versions.

question from:https://stackoverflow.com/questions/18911434/will-items-in-ios-keychain-survive-app-uninstall-and-reinstall

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I dug around on the Apple developer forums, and a Apple developer (eskimo1, aka Quinn) states at 2012-08-27 that this is the current behaviour but it's a far as he knows not /documented/ behaviour, so this might change in the future. He also says that deleting shared keychain items is always going to be tricky, which is one of the reasons this it hasn't been addressed yet.

So I guess that this leaves the question open: there is no definitive answer. It is not documented and can change at any point in time. Relying on it MAY cause problems in the future.

UPDATE 2017-04-04:

In iOS 10.3 beta, keychain info for an app is removed when the app is uninstalled, but this behaviour seems to have been removed in the final 10.3 version. At Apple Documentation It is suggested that this is about to change and we should NOT rely on keychain access data being intact after an app uninstallation. See also iOS 10.3 beta 3 doesn't persist data of KeychainItem.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...