Modifies items that match a search query.


func SecItemUpdate(_ query: CFDictionary, _ attributesToUpdate: CFDictionary) -> OSStatus



A dictionary that describes the search for the keychain items you want to update.


A dictionary containing the attributes whose values should be changed, along with the new values. Only real keychain attributes are permitted in this dictionary (no "meta" attributes are allowed.) See Item Attribute Keys and Values.

Return Value


See the SecItemCopyMatching(_:_:) function for information about how to construct a search dictionary.

See Also

Keychain Item Modification

Updating and Deleting Keychain Items

Modify items in the keychain when the user’s data changes.

func SecItemDelete(CFDictionary) -> OSStatus

Deletes items that match a search query.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software