---
title: "SecKeychainCopySettings(_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/seckeychaincopysettings(_:_:)"
---

# SecKeychainCopySettings(_:_:)

Obtains a keychain’s settings.

## Declaration

```swift
func SecKeychainCopySettings(_ keychain: SecKeychain?, _ outSettings: UnsafeMutablePointer<SecKeychainSettings>) -> OSStatus
```

## Parameters

- `keychain`: A reference to the keychain from which to copy its settings.
- `outSettings`: On return, a pointer to a keychain settings structure. Since this structure is versioned, you must allocate the memory for it and fill in the version of the structure before passing it to the function.

## Return Value

Return Value A result code. See Security Framework Result Codes.
