Function

SecCodeCopyPath

Retrieves the location on disk of signed code, given a code or static code object.

Declaration

OSStatus SecCodeCopyPath(SecStaticCodeRef staticCode, SecCSFlags flags, CFURLRef  _Nullable *path);

Parameters

staticCode

The code or static code object whose code you wish to locate. If you provide a code object, the function processes it in the same manner as the SecCodeCopyStaticCode function.

flags

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

path

On return, provides a URL identifying the location on disk of the code or static code object. For single files, the URL points to the file. For bundles, it points to the directory containing the entire bundle. Call the CFRelease function to release this object when you are finished with it.

Return Value

See Also

Working with Code Objects

SecCodeCopyStaticCode

Returns a static code object representing the on-disk version of the given running code.

Code Signing Architecture Flags

Use these supplemental flags to get static code.