<!--
{
  "availability" : [
    "iOS: 4.2.0 -",
    "iPadOS: 4.2.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaPlayer",
  "identifier" : "/documentation/MediaPlayer/MPMediaEntity/canFilter(byProperty:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Media Player"
    ],
    "preciseIdentifier" : "c:objc(cs)MPMediaEntity(cm)canFilterByProperty:"
  },
  "title" : "canFilter(byProperty:)"
}
-->

# canFilter(byProperty:)

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

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

## Parameters

`property`

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

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the property you are testing can be used to construct a media property predicate of type [`MPMediaPropertyPredicate`](/documentation/MediaPlayer/MPMediaPropertyPredicate); otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

To see which media property keys you can use with this method, refer to [Media entity property keys](/documentation/MediaPlayer/media-entity-property-keys), [General media item property keys](/documentation/MediaPlayer/general-media-item-property-keys), [Playlist property keys](/documentation/MediaPlayer/playlist-property-keys), and [User-defined property keys](/documentation/MediaPlayer/user-defined-property-keys).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)