Class

MPMediaPropertyPredicate

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

Declaration

@interface MPMediaPropertyPredicate : MPMediaPredicate

Overview

Use one or more MPMediaPropertyPredicate objects to define the filter in a media query to retrieve a subset of media items from the Music library. A predicate in this context is a statement of a logical condition that you want to test each media item against. Those items that satisfy the condition are retrieved in the query result.

You define Music library queries, and retrieve query results, using the MPMediaQuery class. The media items and media item collections that you retrieve with a query are described in MPMediaItem and MPMediaItemCollection.

Topics

Creating Media Property Predicates

+ predicateWithValue:forProperty:

Creates a media property predicate with the default comparison type.

+ predicateWithValue:forProperty:comparisonType:

Creates a media property predicate with a specified comparison type.

Examining Media Property Predicates

property

The property that the media property predicate uses when you invoke a query.

value

The value that the media property predicate matches against when you invoke a query.

comparisonType

The type of matching comparison that the media property predicate performs when you invoke a query.

Supporting Types

MPMediaPredicateComparison

Logical comparison types for media queries.

Relationships

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.

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.

MPMediaQuerySection

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

MPMediaPredicate

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software