An abstract class that defines classes for filtering media in a media query.


class MPMediaPredicate : NSObject


In media queries, a predicate is a statement of a logical condition that you want to test each media item against. Media items that satisfy the condition are returned in the query result. Use this class’s concrete subclass, described in MPMediaPropertyPredicate, to define the filter in a media query to retrieve a subset of media items from the library. Media queries are described in MPMediaQuery.


Inherits From

See Also

Media Item Queries

Using Filters to Create Specialized Queries

Add a filter set to a query before populating a music player queue.

class MPMediaQuery

A query that specifies a set of media items from the device’s media library by way of a filter and a grouping type.

class MPMediaQuerySection

A range of media items or media item collections from within a media query.

class MPMediaPropertyPredicate

A set of predicates that define a filter used in a media query.