<!--
{
  "availability" : [
    "macCatalyst: 14.0.0 -",
    "macOS: 10.13.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "iTunesLibrary",
  "identifier" : "/documentation/iTunesLibrary/ITLibMediaEntity",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "iTunes Library"
    ],
    "preciseIdentifier" : "c:objc(cs)ITLibMediaEntity"
  },
  "title" : "ITLibMediaEntity"
}
-->

# ITLibMediaEntity

This class describes a media entity, which can be a media item, such as an audio track.

```
class ITLibMediaEntity
```

## Overview> Note:
> Entity properties are specific to each type of entity, and each specific entity class provides individual accessors for its properties.

Each media entity has a persistent unique ID and set of properties that iTunes assigns.

The `ITLibMediaEntity` class serves as the abstract superclass for [`ITLibMediaItem`](/documentation/iTunesLibrary/ITLibMediaItem) and [`ITLibPlaylist`](/documentation/iTunesLibrary/ITLibPlaylist) instances.

## Topics

### Essentials

[`persistentID`](/documentation/iTunesLibrary/ITLibMediaEntity/persistentID)

The unique identifier of the media entity.

### Getting Media Item Properties

[`enumerateValues(forProperties:using:)`](/documentation/iTunesLibrary/ITLibMediaEntity/enumerateValues(forProperties:using:))

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

[`enumerateValuesExcept(forProperties:using:)`](/documentation/iTunesLibrary/ITLibMediaEntity/enumerateValuesExcept(forProperties:using:))

Executes a provided block with the fetched values for all properties in the entity except for the provided set.

[`value(forProperty:)`](/documentation/iTunesLibrary/ITLibMediaEntity/value(forProperty:))

Gets the value for a specified media property key.



---

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)