<!--
{
  "availability" : [
    "iOS: 7.1.0 -",
    "iPadOS: 7.1.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.2 -",
    "tvOS: 7.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaPlayer",
  "identifier" : "/documentation/MediaPlayer/MPContentItem/identifier",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Media Player"
    ],
    "preciseIdentifier" : "c:objc(cs)MPContentItem(py)identifier"
  },
  "title" : "identifier"
}
-->

# identifier

The unique identifier for the media item.

```
var identifier: String { get }
```

## Discussion

All media items must have a unique identifier. Identifiers must be unique so that Media Player can properly update existing media items or add new media items. Media items won’t update properly if multiple media items have the same identifier.

## See Also

[`-  initWithIdentifier:`](/documentation/MediaPlayer/MPContentItem/init(identifier:))

Sets the identifier for a media item.



---

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)