General Media Item Property Keys

System defined properties used to obtain the metadata for a media item.

Overview

Obtain metadata for a media item by calling the value(forProperty:) method with these property keys. Some properties can be used to build media property predicates, as described in MPMediaPropertyPredicate. These properties are marked here as filterable.

Topics

Filterable by MPMediaPropertyPredicate Queries

let MPMediaItemPropertyAlbumArtist: String

The primary performing artist for an album as a whole.

let MPMediaItemPropertyAlbumArtistPersistentID: String

The persistent identifier for an album artist.

let MPMediaItemPropertyAlbumPersistentID: String

The key for the persistent identifier for an album.

let MPMediaItemPropertyArtist: String

The performing artist(s) for a media item—which may vary from the primary artist for the album that a media item belongs to.

let MPMediaItemPropertyArtistPersistentID: String

The key for the persistent identifier for an artist.

let MPMediaItemPropertyComposer: String

The musical composer for the media item.

let MPMediaItemPropertyComposerPersistentID: String

The persistent identifier for a composer.

let MPMediaItemPropertyGenre: String

The musical or film genre of the media item.

let MPMediaItemPropertyGenrePersistentID: String

The persistent identifier for a genre.

let MPMediaItemPropertyHasProtectedAsset: String

A Boolean value indicating the media item is wrapped in DRM and can not be used through a standard playback API.

let MPMediaItemPropertyIsCompilation: String

A Boolean value that indicates whether the media item is part of a compilation.

let MPMediaItemPropertyIsCloudItem: String

A Boolean value indicating whether the media item is an iCloud item.

let MPMediaItemPropertyMediaType: String

The media type of the media item.

let MPMediaItemPropertyPersistentID: String

The key for the persistent identifier for the media item.

let MPMediaItemPropertyPlayCount: String

The number of times the user has played the media item.

let MPMediaItemPropertyPodcastPersistentID: String

The persistent identifier for an audio podcast.

let MPMediaItemPropertyTitle: String

The title (or name) of the media item.

Not Filterable by MPMediaPropertyPredicate Queries

let MPMediaItemPropertyPlaybackDuration: String

The playback duration of the media item.

let MPMediaItemPropertyAlbumTrackNumber: String

The track number of the media item, for a media item that is part of an album.

let MPMediaItemPropertyAlbumTrackCount: String

The number of tracks in the album that contains the media item.

let MPMediaItemPropertyDiscNumber: String

The disc number of the media item, for a media item that is part of a multi-disc album.

let MPMediaItemPropertyDiscCount: String

The number of discs in the album that contains the media item.

let MPMediaItemPropertyArtwork: String

The artwork image for the media item.

let MPMediaItemPropertyLyrics: String

The lyrics for the media item.

let MPMediaItemPropertyReleaseDate: String

The date on which the media item was first publicly released.

let MPMediaItemPropertyBeatsPerMinute: String

The number of musical beats per minute for the media item, corresponding to the “BPM” field in the Info tab in the Get Info dialog in iTunes.

let MPMediaItemPropertyComments: String

Textual information about the media item, corresponding to the “Comments” field in the Info tab in the Get Info dialog in iTunes.

let MPMediaItemPropertyAssetURL: String

A URL pointing to the media item, from which an AVAsset object (or other URL-based AVFoundation object) can be created, with any options as desired.

let MPMediaItemPropertyIsExplicit: String

A Boolean value indicating whether the media item contains explicit content.

let MPMediaItemPropertyPlaybackStoreID: String

The identifier used to enqueue store tracks.

See Also

Media Item Types and Keys

struct MPMediaType

The properties used to define the type for a media item.

User-Defined Property Keys

Contains properties used to obtain user-defined metadata for a media item.