<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaPlayer",
  "identifier" : "/documentation/MediaPlayer/MPMediaEntity/enumerateValues(forProperties:using:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Media Player"
    ],
    "preciseIdentifier" : "c:objc(cs)MPMediaEntity(im)enumerateValuesForProperties:usingBlock:"
  },
  "title" : "enumerateValues(forProperties:using:)"
}
-->

# enumerateValues(forProperties:using:)

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

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

## Parameters

`properties`

A set of property keys that you want the values for.

`block`

A block object that executes for each fetched property value.

## Discussion

Use this method to get property values in a batch fashion. Anytime the app accesses more than one property, enumerating over a set of property keys is more efficient than fetching each individual property with [`value(forProperty:)`](/documentation/MediaPlayer/MPMediaEntity/value(forProperty:)).

To see which media property keys you can use with this method, refer to [Media entity property keys](/documentation/MediaPlayer/media-entity-property-keys), [General media item property keys](/documentation/MediaPlayer/general-media-item-property-keys), [Playlist property keys](/documentation/MediaPlayer/playlist-property-keys), and [User-defined property keys](/documentation/MediaPlayer/user-defined-property-keys).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)