The list of keychain events that can trigger a callback.


enum SecKeychainEvent : UInt32


Keychain Services includes one of these events in the callback you register with SecKeychainAddCallback(_:_:_:), using the function signature defined by SecKeychainCallback, to indicate what event triggered the callback.



case lockEvent

Indicates a keychain was locked.

case unlockEvent

Indicates a keychain was successfully unlocked.

case addEvent

Indicates an item was added to a keychain.

case deleteEvent

Indicates an item was deleted from a keychain.

case updateEvent

Indicates a keychain item was updated.

case passwordChangedEvent

Indicates the keychain password was changed.

case defaultChangedEvent

Indicates that a different keychain was specified as the default.

case dataAccessEvent

Indicates a process has accessed a keychain item’s data.

case keychainListChangedEvent

Indicates the list of keychains has changed.

case trustSettingsChangedEvent

Indicates trust settings have changed.

See Also


func SecKeychainRemoveCallback(SecKeychainCallback) -> OSStatus

Unregisters your keychain event callback function.

typealias SecKeychainCallback

A customized callback function that keychain services call when a keychain event has occurred.

struct SecKeychainCallbackInfo

Information about a keychain event that keychain services deliver to your app via a callback function.

struct SecKeychainEventMask

Bit masks corresponding to the events that can trigger a keychain callback.