Updates the status and attributes of a particular guest.


func SecHostSetGuestStatus(_ guestRef: SecGuestRef, _ status: UInt32, _ attributes: CFDictionary?, _ flags: SecCSFlags) -> OSStatus



The guest code object of the code on whose behalf this thread is acting.


A new set of code status flags for the guest (see SecCodeStatus. The host must enforce the restrictions on changes to guest status: the valid bit can only be cleared and the hard and kill flags can only be set. Pass the previous guest status to indicate that no change is desired.


A key-value dictionary of attributes that can be used to identify this particular guest among all of the caller’s guests. If you include this dictionary, it completely replaces earlier-specified attributes. Pass NULL for this parameter if you do not want to change the attributes for this guest. Although you can specify any key-value pairs in this attributes dictionary, the keys in Guest Attribute Dictionary Keys are conventionally used for this purpose.


Optional flags; see SecCSFlags for possible values. Pass kSecCSDefaultFlags for standard behavior.

Return Value


This function must be called by a host acting in proxy mode every time the status of a guest changes so that Code Signing Services can update the information cache for that guest. The specified guest must have been created using the SecHostCreateGuest(_:_:_:_:_:_:) function.

See Also

Guest Code

Hosting Guest Code

Securely launch and manage plug-ins and other executable entities, known as guest code, from within your app acting as a host.

func SecCodeCopyGuestWithAttributes(SecCode?, CFDictionary?, SecCSFlags, UnsafeMutablePointer<SecCode?>) -> OSStatus

Asks a code host to identify one of its guests given the type and value of specific attributes of the guest code.

Null Guest Handle

Use this special value to stand in for a null guest object.

struct SecCodeStatus

Operational flags attached by code signing services to running code.

Guest Creation Flags

Use these supplemental flags to create a guest object.

Guest Attribute Dictionary Keys

Specify attributes of guest code.

typealias SecGuestRef

A reference to a guest object, which identifies a particular block of guest code in the context of its code signing host.