Function

SecTrustedApplicationCreateFromPath

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

Declaration

OSStatus SecTrustedApplicationCreateFromPath(const char *path, SecTrustedApplicationRef  _Nullable *app);

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

SecTrustedApplicationCopyData

Retrieves the data of a trusted app instance.

Deprecated
SecTrustedApplicationSetData

Sets the data of a given trusted app instance.

Deprecated
SecTrustedApplicationRef

An opaque type that contains information about a trusted app.

SecTrustedApplicationGetTypeID

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