---
title: "enumerateValues(forProperties:using:)"
framework: ituneslibrary
role: symbol
role_heading: Instance Method
path: "ituneslibrary/itlibmediaentity/enumeratevalues(forproperties:using:)"
---

# enumerateValues(forProperties:using:)

Executes a provided block with the fetched values for the item properties.

## Declaration

```swift
func enumerateValues(forProperties properties: Set<String>?, using block: @escaping (String, Any, UnsafeMutablePointer<ObjCBool>) -> Void)
```

## Parameters

- `properties`: A set of keys for the properties to enumerate, or nil to enumerate all properties. Takes Media Item Properties and Playlist Properties from doc://com.apple.ituneslibrary/documentation/iTunesLibrary/ITLibMediaItem.
- `block`: A block object that executes for each property in the properties set.

## Discussion

Discussion Use this method to get property values in a batch fashion. In some cases, enumerating over a set of property keys can be more efficient than fetching each individual property with value(forProperty:).

## See Also

### Getting Media Item Properties

- [enumerateValuesExcept(forProperties:using:)](ituneslibrary/itlibmediaentity/enumeratevaluesexcept(forproperties:using:).md)
- [value(forProperty:)](ituneslibrary/itlibmediaentity/value(forproperty:).md)
