---
title: "SecCopyErrorMessageString(_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/seccopyerrormessagestring(_:_:)"
---

# SecCopyErrorMessageString(_:_:)

Returns a string explaining the meaning of a security result code.

## Declaration

```swift
func SecCopyErrorMessageString(_ status: OSStatus, _ reserved: UnsafeMutableRawPointer?) -> CFString?
```

## Parameters

- `status`: A result code of type OSStatus returned by a security function. See doc://com.apple.security/documentation/Security/security-framework-result-codes for a list of codes.
- `reserved`: Reserved for future use. Pass nil for this parameter.

## Return Value

Return Value A human-readable string describing the result, or nil if no string is available for the specified result code. In Objective-C, call the CFRelease function to release this object when you are finished using it.
