Sets the application list, description, and prompt selector for a given ACL entry.


func SecACLSetContents(_ acl: SecACL, _ applicationList: CFArray?, _ description: CFString, _ promptSelector: SecKeychainPromptSelector) -> OSStatus



The ACL entry to modify.


An array of SecTrustedApplication instances identifying apps that are allowed access to the keychain item without user confirmation. Use the SecTrustedApplicationCreateFromPath(_:_:) method to create trusted app objects.

If you set this parameter to nil, then any app can use this item. If you pass an empty array, then no apps are trusted.


The name of the keychain item that appears in the dialog box when the user is prompted for permission to use the item. Note that this name is not necessarily the same as the one displayed for the item by the Keychain Access app.


The prompt selector flags for the given access control list entry. See SecKeychainPromptSelector for details.

Return Value


Because an ACL entry is always associated with an access instance, when you modify the entry, you are modifying the access instance as well.

Use the SecACLCopyAuthorizations(_:) method to get the list of operations for an ACL entry.

See Also

Access Control List Configuration

func SecACLCopyAuthorizations(SecACL) -> CFArray

Retrieves the authorization tags of a given ACL entry.

func SecACLUpdateAuthorizations(SecACL, CFArray) -> OSStatus

Sets the authorization tags for a given ACL.