---
title: ratingCommand
framework: mediaplayer
role: symbol
role_heading: Instance Property
path: mediaplayer/mpremotecommandcenter/ratingcommand
---

# ratingCommand

The command object for rating a media item.

## Declaration

```swift
var ratingCommand: MPRatingCommand { get }
```

## Discussion

Discussion Use the object in this property to register your app’s handler for rating the current track. In your handler, apply the specified rating to the track. You can disable the command if your app does not support it.

## See Also

### Rating a media item

- [likeCommand](mediaplayer/mpremotecommandcenter/likecommand.md)
- [dislikeCommand](mediaplayer/mpremotecommandcenter/dislikecommand.md)
