<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/SecCodeSignatureFlags",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@E@SecCodeSignatureFlags"
  },
  "title" : "SecCodeSignatureFlags"
}
-->

# SecCodeSignatureFlags

Specify option flags that can be embedded in a code signature during signing and that govern the use of the signature.

```
struct SecCodeSignatureFlags
```

## Overview

Some of these flags can be set through the `codesign(1)` command’s `--options` argument and some are set implicitly based on signing circumstances. The flags here appear as the value associated with the [`kSecCodeInfoFlags`](/documentation/Security/kSecCodeInfoFlags) key in the signing information dictionary. See [Signing Information Dictionary Keys](/documentation/Security/signing-information-dictionary-keys).

## Topics

### Initializers

[`init(rawValue:)`](/documentation/Security/SecCodeSignatureFlags/init(rawValue:))

### Constants

[`host`](/documentation/Security/SecCodeSignatureFlags/host)

May host guest code.

[`adhoc`](/documentation/Security/SecCodeSignatureFlags/adhoc)

Must be used without a signing identity.

[`forceHard`](/documentation/Security/SecCodeSignatureFlags/forceHard)

Always set the [`hard`](/documentation/Security/SecCodeStatus/hard) status flag on launch.

[`forceKill`](/documentation/Security/SecCodeSignatureFlags/forceKill)

Always set the termination status flag on launch.

[`forceExpiration`](/documentation/Security/SecCodeSignatureFlags/forceExpiration)

Always set the [`considerExpiration`](/documentation/Security/SecCSFlags/considerExpiration) flag when validating the code.

[`enforcement`](/documentation/Security/SecCodeSignatureFlags/enforcement)

Enforce code signing.

[`libraryValidation`](/documentation/Security/SecCodeSignatureFlags/libraryValidation)

Require library validation.

[`restrict`](/documentation/Security/SecCodeSignatureFlags/restrict)

Restrict dyld loading.

[`runtime`](/documentation/Security/SecCodeSignatureFlags/runtime)

Apply runtime hardening policies as required by the hardened runtime version.

### Type Properties

[`linkerSigned`](/documentation/Security/SecCodeSignatureFlags/linkerSigned)



---

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)