Type Method

canFilter(byProperty:)

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

Declaration

class func canFilter(byProperty property: String) -> Bool

Parameters

property

The key for the media property that you want to examine.

Return Value

true if the property you are testing can be used to construct a media property predicate (of type MPMediaPropertyPredicate); otherwise, false.

Discussion

The media property keys you can use with this property are listed in this document and in General Media Item Property Keys, Podcast Item Property Keys, Playlist Property Keys, and User-Defined Property Keys.

See Also

Working with Media Properties

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.