<!--
{
  "documentType" : "article",
  "framework" : "Security",
  "identifier" : "/documentation/Security/code-attributes",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Code Attributes"
}
-->

# Code Attributes

Specify these keys from the attribute dictionary when you create a static code instance.

## Discussion

Use these keys in the attribute dictionary when calling the [`SecStaticCodeCreateWithPathAndAttributes(_:_:_:_:)`](/documentation/Security/SecStaticCodeCreateWithPathAndAttributes(_:_:_:_:)) function.

## Topics

### Constants

[`let kSecCodeAttributeArchitecture: CFString`](/documentation/Security/kSecCodeAttributeArchitecture)

A key whose value is a string that indicates an architecture, such as `i386` or `x86_64`.

[`let kSecCodeAttributeSubarchitecture: CFString`](/documentation/Security/kSecCodeAttributeSubarchitecture)

A key whose value is a string indicating a specific processor type, such as `i686` or `core2`.

[`let kSecCodeAttributeBundleVersion: CFString`](/documentation/Security/kSecCodeAttributeBundleVersion)

A key whose value indicates the bundle version.

[`let kSecCodeAttributeUniversalFileOffset: CFString`](/documentation/Security/kSecCodeAttributeUniversalFileOffset)

A key whose value indicates the offset of a Mach-O specific slice of a universal Mach-O file.



---

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)