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

# CMSEncoderGetHasDetachedContent(_:_:)

Indicates whether the message is to have detached content.

```
func CMSEncoderGetHasDetachedContent(_ cmsEncoder: CMSEncoder, _ detachedContentOut: UnsafeMutablePointer<DarwinBoolean>) -> OSStatus
```

## Parameters

`cmsEncoder`

The CMSEncoder reference returned by the `CMSEncoderCreate` function.

`detachedContentOut`

Returns `TRUE` if the message has detached content.

## Return Value

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

## Discussion

This function returns the value specified in `CMSEncoderSetHasDetachedContent` if that function has been called; otherwise it returns `FALSE`.

## See Also

[`CMSEncoderSetHasDetachedContent(_:_:)`](/documentation/Security/CMSEncoderSetHasDetachedContent(_:_:))

Specifies whether the signed data is to be separate from the message.

[`CMSDecoderCreate(_:)`](/documentation/Security/CMSDecoderCreate(_:))

Creates a CMSDecoder reference.



---

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)