iOS钥匙串中的项目能否在应用程序卸载和重新安装后生效? [英] Will items in iOS keychain survive app uninstall and reinstall?

查看:137
本文介绍了iOS钥匙串中的项目能否在应用程序卸载和重新安装后生效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找有关iOS钥匙串项目的文档。我的具体问题是,如果钥匙串项目在应用程序卸载和重新安装周期后仍然存在。
它似乎从iOS 4(或者甚至iOS 3)开始就是这样,但是我找不到Apple的任何文档,说明这实际上应该以这种方式工作。

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.

编辑:我意识到Daij-Djan指出的问题有点不清楚。我正在寻找的是支持众所周知行为的官方文档。

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.

更新2017-04-04:请参阅下面的答案,iOS 10.3中的行为更改公测。它在iOS 10.3中正常工作,但在将来的版本中可能会有所改变。

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.

推荐答案

我在Apple开发者论坛上挖掘, Apple开发人员(eskimo1,又名Quinn)在2012-08-27声明这是当前的行为,但是他知道没有/记录/行为,所以这可能会在未来发生变化。他还说删除共享的钥匙串项目总是很棘手,这也是它尚未解决的原因之一。

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:

iOS 10.3 测试版中,卸载应用时会删除应用的钥匙串信息,但此行为似乎已在最终的10.3版本中删除。在 Apple文档建议这将改变,我们不应该在卸载应用程序后,依赖于钥匙串访问数据完好无损。
另请参阅 iOS 10.3 beta 3 doesn' t持久KeychainItem数据

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.

这篇关于iOS钥匙串中的项目能否在应用程序卸载和重新安装后生效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆