---
title: "MDItemCopyAttributes(_:_:)"
framework: coreservices
role: symbol
role_heading: Function
path: coreservices/1426980-mditemcopyattributes
---

# MDItemCopyAttributes(_:_:)

Returns the values of the specified attributes in the metadata item.

## Declaration

```swift
func MDItemCopyAttributes(_ item: MDItem!, _ names: CFArray!) -> CFDictionary!
```

## Parameters

- `item`: The item to be queried.
- `names`: A CFArray containing the names of the requested attributes.

## Return Value

Return Value A CFDictionary containing keys for the requested attribute names, and the corresponding values. If an attribute does not exist, or the attribute is unreadable, there will be no key-value pair for it in the dictionary. Returns NULL on failure.

## See Also

### Retrieving Metadata Attributes 

- [MDItemCopyAttribute(_:_:)](coreservices/1427080-mditemcopyattribute.md)
- [MDItemCopyAttributeNames(_:)](coreservices/1427066-mditemcopyattributenames.md)
