<!--
{
  "availability" : [
    "macOS: 10.0.0 - 10.10.0"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/SecTrustedApplicationCreateFromPath(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@F@SecTrustedApplicationCreateFromPath"
  },
  "title" : "SecTrustedApplicationCreateFromPath(_:_:)"
}
-->

# SecTrustedApplicationCreateFromPath(_:_:)

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

```
func SecTrustedApplicationCreateFromPath(_ path: UnsafePointer<CChar>?, _ 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 <doc://com.apple.documentation/documentation/CoreFoundation/CFRelease> method to release this instance when you are finished using it.

## Return Value

A result code. See [Security Framework Result Codes](/documentation/Security/security-framework-result-codes).

## 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(_:_:_:)`](/documentation/Security/SecAccessCreate(_:_:_:)) method, which creates an access instance. The access instance, in turn, is used as input to the [`SecKeychainItemSetAccess(_:_:)`](/documentation/Security/SecKeychainItemSetAccess(_:_:)) function to specify the set of apps that are trusted to access a specific keychain item.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)