简体   繁体   English

我存储的钥匙串数据是否仅限于我的应用程序?

[英]Is keychain data that I store restricted to my app?

如果我在钥匙串中放入一些信息,那么我的应用程序是唯一能够访问该数据的应用程序,对吗?

The keychain data are shared across a developer's applications. 钥匙串数据在开发人员的应用程序之间共享。 From the apple documentation : 苹果文档

Keychain data for an app is stored outside of the app's sandbox. 应用程序的钥匙串数据存储在应用程序的沙箱外部。 When the user backs up app data using iTunes, the keychain data is also backed up. 当用户使用iTunes备份应用程序数据时,钥匙串数据也会被备份。 Before iOS 4.0, keychain data could only be restored to the device from which the backup was made. 在iOS 4.0之前,只能将钥匙串数据还原到进行备份的设备上。 In iOS 4.0 and later, a keychain item that is password protected can be restored to a different device only if its accessibility is not set to kSecAttrAccessibleAlwaysThisDeviceOnly or any other value that restricts it to the current device. 在iOS 4.0及更高版本中,只有当其可访问性未设置为kSecAttrAccessibleAlwaysThisDeviceOnly或将其限制为当前设备的任何其他值时,才可以将受密码保护的钥匙串项目还原到其他设备。 Upgrading an app does not affect that app's keychain data. 升级应用程序不会影响该应用程序的钥匙串数据。

Here is an example of sharing keychain information between applications. 是在应用程序之间共享钥匙串信息的示例。

The data an app puts into the Keychain is restricted to a single developer's apps. 应用程序放入钥匙串的数据仅限于单个开发人员的应用程序。 It can be shared by multiple apps by the same developer if desired or restricted to that app. 如果需要或限于同一应用程序,则可以由同一个开发人员共享多个应用程序。

See WWDC13 2013 video "Protecting Secrets with the Keychain". 参见WWDC13 2013视频“使用钥匙串保护秘密”。 You can access it either on you computer or on an iOS device with the Apple WWDC app. 您可以使用Apple WWDC应用程序在计算机上或在iOS设备上访问它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM