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

# SecTransformGetAttribute(_:_:)

Gets the current value of a transform attribute.

```
func SecTransformGetAttribute(_ transformRef: SecTransform, _ key: CFString) -> CFTypeRef?
```

## Parameters

`transformRef`

The transform whose attribute value will be retrieved.

`key`

The name of the attribute to retrieve. See [Transform Attributes](/documentation/Security/transform-attributes)  for a list of valid keys.

## Return Value

The value of an attribute. If this attribute is being set as the output of another transform and [`SecTransformExecute(_:_:)`](/documentation/Security/SecTransformExecute(_:_:)) has not been called on the transform or if the attribute does not exists then `NULL` will be returned.

## Discussion

This may be called after [`SecTransformExecute(_:_:)`](/documentation/Security/SecTransformExecute(_:_:)).

---

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)