Class

MPFeedbackCommand

An object that reflects the feedback state for the item that your app is currently playing.

Declaration

class MPFeedbackCommand : MPRemoteCommand

Overview

The shared MPRemoteCommandCenter object vends feedback objects for liking, disliking, and bookmarking media items. Use these objects to register handlers for the types of feedback your app supports and to perform the appropriate tasks when that feedback changes. When the currently playing item changes, you can also use this object to set the feedback state for the new item.

When the state of a feedback item changes, the system delivers an appropriate event to registered handlers of this object. Your handler code must determine which media item receives the feedback and then apply the update the feedback state for that item. You might also perform other tasks related to receiving feedback. For example, if the user likes the currently playing song, you might update the appropriate UI in your app or use the information to recommend similar songs.

Topics

Retrieving Information About a Feedback Command

var isActive: Bool

A Boolean value that indicates whether the feedback’s action is on or off.

var localizedTitle: String

A localized string used to describe the context of a command.

var localizedShortTitle: String

A shortened version of the string used to describe the context of a command.

Relationships

Inherits From

Conforms To

See Also

Responding to Feedback and Rating Events

class MPFeedbackCommandEvent

An event requesting a change in the feedback setting.

class MPRatingCommand

An object that provides a detailed rating for the item being played.

class MPRatingCommandEvent

An event requesting a change in the rating.