Class

MPMediaEntity

The abstract superclass for media items, media item collections, and media playlist instances.

Declaration

class MPMediaEntity : NSObject

Overview

This is the superclass for MPMediaItem and MPMediaItemCollection instances, and in turn for MPMediaPlaylist instances.

Topics

Working with Media Properties

class func canFilter(byProperty: String) -> Bool

Indicates if a media property key can be used to construct a media property predicate.

func enumerateValues(forProperties: Set<String>, using: (String, Any, UnsafeMutablePointer<ObjCBool>) -> Void)

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

var persistentID: MPMediaEntityPersistentID

The persistent identifier for a media entity.

subscript(Any) -> Any?

Returns the object specified by the key.

func value(forProperty: String) -> Any?

Retrieves the value for a specified media property key.

typealias MPMediaEntityPersistentID

Defines the type for storing a persistent identifier to a particular entity.

Media Entity Property Keys

Media Entity Property Keys

The property keys used to retrieve metadata for media entities.

Relationships

Inherits From

See Also

Media Items and Playlists

class MPMediaItem

A collection of properties that represents a single item contained in the media library.

class MPMediaItemArtwork

A graphical image, such as music album cover art, associated with a media item.

class MPMediaItemCollection

A sorted set of media items from the media library.

class MPMediaPlaylist

A playable collection of related media items.

class MPMediaPlaylistCreationMetadata

A set of attributes used to describe a playlist when the playlist is first created.