ios - 使用 updateApplicationContext 发送钥匙串(keychain)值是否安全

标签 ios watchkit watchos-2 watchconnectivity

在 watchOS 2 中,不再有共享钥匙串(keychain)。

如果我想将钥匙串(keychain)值从 iOS 应用程序发送到 Watch 应用程序,通过 WCSession updateApplicationContext 发送它是否安全?

最佳答案

是的。

如果您的钥匙串(keychain)值没有改变,并且您反复更新您的应用程序上下文,您可能希望安排只发送一次该值(以便 watch 添加到其钥匙串(keychain)),而不是重复重新发送钥匙串(keychain)值.

Apple 工程师讨论 using Watch Connectivity to send keychain items在开发者论坛上:

If you have data on the phone that you want to access on the watch your app can use WatchConnectivity to transfer the specific data and keychain items it needs. The keychain on Apple Watch contains a distinct set of entries from the keychain on the paired iPhone, so if you need something in both places you can either generate it once for each device or use WatchConnectivity to transfer it between them.

更新:

在 watchOS 2 中,Watch Connectivity 是一种在配对手机和 watch 之间传输数据的机制。根据 iOS Security Guide,设备之间的通信是加密的.

至于字典是否可以在内存中访问,或者它如何在您的扩展程序收到它之前持久保存,我认为您必须依靠 Apple 来解决任何可能的漏洞。

可以合理地说,在您的扩展程序唤醒、接收更新,然后将值存储在钥匙串(keychain)之前,信息并不像钥匙串(keychain)那样位于安全的地方

关于ios - 使用 updateApplicationContext 发送钥匙串(keychain)值是否安全,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35073236/

相关文章:

ios - 使用 CCSprites 制作 b2Body 动画?

ios - Apple Watch 上的图像

ios - watch 操作系统 : Should UI updates from the extension be called on the main thread?

ios - Xcode 7 : WatchOS storyboards do not support target device type 'iphone'

ios - 如何隐藏特定版本的 Apple Watch 应用程序

ios - 使用 openssl/x509.h 解析证书

ios - Swift 3 数组扩展错误

xcode - 如何设置分发版本以使 watchkit 应用程序正常工作?

ios - SwiftUI在watchOS上通过NavigationLink列出性能下降

ios - 如何使用 cocoapod 包含 ios 应用程序和 watch 扩展的共享框架