---
title: "SecTaskCopyValuesForEntitlements(_:_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/sectaskcopyvaluesforentitlements(_:_:_:)"
---

# SecTaskCopyValuesForEntitlements(_:_:_:)

Returns the values of multiple entitlements for the represented task.

## Declaration

```swift
func SecTaskCopyValuesForEntitlements(_ task: SecTask, _ entitlements: CFArray, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>?) -> CFDictionary?
```

## Parameters

- `task`: The task whose entitlements you want.
- `entitlements`: An array of the names of the entitlement to be fetched.
- `error`: A pointer that the function uses to provide an error object with details if an error occurs. The caller becomes responsible for the object’s memory. Pass NULL to ignore the error.

## Return Value

Return Value A dictionary containing the entitlement names as keys with the corresponding entitlements as the dictionary values, or NULL on error. In Objective-C, call the CFRelease function to free this dictionary’s memory when you are done with it.
