---
title: "canFilter(byProperty:)"
framework: mediaplayer
role: symbol
role_heading: Type Method
path: "mediaplayer/mpmediaentity/canfilter(byproperty:)"
---

# canFilter(byProperty:)

Indicates whether you can use the media property key that you specify to construct a media property predicate.

## Declaration

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

## Parameters

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

## Return Value

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

## Discussion

Discussion To see which media property keys you can use with this method, refer to Media entity property keys, General media item property keys, Playlist property keys, and User-defined property keys.

## See Also

### Working with media properties

- [enumerateValues(forProperties:using:)](mediaplayer/mpmediaentity/enumeratevalues(forproperties:using:).md)
- [persistentID](mediaplayer/mpmediaentity/persistentid.md)
- [subscript(_:)](mediaplayer/mpmediaentity/subscript(_:).md)
- [value(forProperty:)](mediaplayer/mpmediaentity/value(forproperty:).md)
- [MPMediaEntityPersistentID](mediaplayer/mpmediaentitypersistentid.md)
