A key whose value indicates whether to treat macOS keychain items like iOS keychain items.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
Set the value for this key to
true in the query dictionary when accessing a macOS keychain item that behaves like an iOS keychain item. For example, use the data protection key when adding, searching for, or deleting an item to which the
k attributes apply.
The data protection key affects operations only in macOS. Other platforms automatically behave as if the key is set to
true, and ignore the key in the query dictionary. You can safely use the key on all platforms.
Items that you store or have stored in macOS with the
k attribute set to
true also behave like iOS keychain items. However, a
true value for that attribute additionally causes iCloud to synchronize the item across all the user’s devices. Use
k to get the iOS behavior without synchronization.