热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

iOS钥匙串中的项目能否在应用程序卸载和重新安装后生效?-WillitemsiniOSkeychainsurviveappuninstallandreinstall?

IamlookingfordocumentationabouttheiOSkeychainitems.Myspecificquestionisifkeychainite

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.

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

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.

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

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.

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

3 个解决方案

#1


10  

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.

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

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:

更新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.

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

#2


7  

Perhaps this is what you are looking for.
Apple Documentation

也许这就是你要找的东西。 Apple文档

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.

注意:在iPhone上,Keychain权限取决于用于签署应用程序的配置文件。确保在不同版本的应用程序中始终使用相同的配置文件。

#3


4  

yes they will.

是他们会。

see a correspondinng question of mine:

看到我的相关问题:

How to find out WHEN a user bought the app / installed it for the first time (possible without UDID?)

如何找出用户第一次购买应用程序/安装它(可能没有UDID?)


AS I SEE IT:

照我看来:

'Officially' it is implied by the fact that the keychain is for multiple apps.. and that it 'belongs' to the os:

'正式'这是因为钥匙串适用于多个应用程序......并且它“属于”操作系统:

Apple Documentation

Apple文档

A keychain is an encrypted container that holds passwords for multiple applications and secure services.

钥匙串是一个加密容器,用于存放多个应用程序和安全服务的密码。

=> ergo the keychain survives the app

=> ergo钥匙串幸存了应用程序

PLUS

a keychain item can be shared between multiple apps

钥匙串项目可以在多个应用程序之间共享


推荐阅读
  • 本文详细介绍了如何在Linux系统上安装和配置Smokeping,以实现对网络链路质量的实时监控。通过详细的步骤和必要的依赖包安装,确保用户能够顺利完成部署并优化其网络性能监控。 ... [详细]
  • DNN Community 和 Professional 版本的主要差异
    本文详细解析了 DotNetNuke (DNN) 的两种主要版本:Community 和 Professional。通过对比两者的功能和附加组件,帮助用户选择最适合其需求的版本。 ... [详细]
  • 本文详细介绍如何使用Samba软件配置CIFS文件共享服务,涵盖安装、配置、权限管理及多用户挂载等关键步骤。通过具体示例和命令行操作,帮助读者快速搭建并优化Samba服务器。 ... [详细]
  • [论文笔记] Crowdsourcing Translation: Professional Quality from Non-Professionals (ACL, 2011)
    Time:4hoursTimespan:Apr15–May3,2012OmarZaidan,ChrisCallison-Burch:CrowdsourcingTra ... [详细]
  • 深入解析JVM垃圾收集器
    本文基于《深入理解Java虚拟机:JVM高级特性与最佳实践》第二版,详细探讨了JVM中不同类型的垃圾收集器及其工作原理。通过介绍各种垃圾收集器的特性和应用场景,帮助读者更好地理解和优化JVM内存管理。 ... [详细]
  • Docker的安全基准
    nsitionalENhttp:www.w3.orgTRxhtml1DTDxhtml1-transitional.dtd ... [详细]
  • 本文将介绍如何编写一些有趣的VBScript脚本,这些脚本可以在朋友之间进行无害的恶作剧。通过简单的代码示例,帮助您了解VBScript的基本语法和功能。 ... [详细]
  • Explore how Matterverse is redefining the metaverse experience, creating immersive and meaningful virtual environments that foster genuine connections and economic opportunities. ... [详细]
  • PyCharm下载与安装指南
    本文详细介绍如何从官方渠道下载并安装PyCharm集成开发环境(IDE),涵盖Windows、macOS和Linux系统,同时提供详细的安装步骤及配置建议。 ... [详细]
  • Explore a common issue encountered when implementing an OAuth 1.0a API, specifically the inability to encode null objects and how to resolve it. ... [详细]
  • CentOS7源码编译安装MySQL5.6
    2019独角兽企业重金招聘Python工程师标准一、先在cmake官网下个最新的cmake源码包cmake官网:https:www.cmake.org如此时最新 ... [详细]
  • 本文详细介绍了 Dockerfile 的编写方法及其在网络配置中的应用,涵盖基础指令、镜像构建与发布流程,并深入探讨了 Docker 的默认网络、容器互联及自定义网络的实现。 ... [详细]
  • 解决PHP与MySQL连接时出现500错误的方法
    本文详细探讨了当使用PHP连接MySQL数据库时遇到500内部服务器错误的多种解决方案,提供了详尽的操作步骤和专业建议。无论是初学者还是有经验的开发者,都能从中受益。 ... [详细]
  • 本文深入探讨了Linux系统中网卡绑定(bonding)的七种工作模式。网卡绑定技术通过将多个物理网卡组合成一个逻辑网卡,实现网络冗余、带宽聚合和负载均衡,在生产环境中广泛应用。文章详细介绍了每种模式的特点、适用场景及配置方法。 ... [详细]
  • 离线环境下的Python及其第三方库安装指南
    在项目开发中,有时会遇到电脑只能连接内网或完全无法联网的情况。本文将详细介绍如何在这种环境下安装Python及其所需的第三方库,确保开发工作的顺利进行。 ... [详细]
author-avatar
草莓顽子该_589
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有