Function

SecTrustedApplicationCreateFromPath(_:_:)

Creates a trusted app instance based on the app at the given path in the file system.

Declaration

func SecTrustedApplicationCreateFromPath(_ path: UnsafePointer<Int8>?, _ app: UnsafeMutablePointer<SecTrustedApplication?>) -> OSStatus

Parameters

path

The path to the app to trust. For application bundles, use the path to the bundle directory. Pass nil to refer to the calling app.

app

On return, points to the newly created trusted app instance. Call the CFRelease method to release this instance when you are finished using it.

Return Value

Discussion

Use this method to create a trusted app instance, which both identifies an app and provides data that can be used to ensure that the app hasn’t been altered since the instance was created.

You can use the created instance as input to the SecAccessCreate(_:_:_:) method, which creates an access instance. The access instance, in turn, is used as input to the SecKeychainItemSetAccess(_:_:) function to specify the set of apps that are trusted to access a specific keychain item.

See Also

Trusted Applications

func SecTrustedApplicationSetData(SecTrustedApplication, CFData) -> OSStatus

Sets the data of a given trusted app instance.

Deprecated
class SecTrustedApplication

An opaque type that contains information about a trusted app.

func SecTrustedApplicationGetTypeID() -> CFTypeID

Returns the unique identifier of the opaque type to which a trusted app instance belongs.