An intents handler's response to a play media intent.


class INPlayMediaIntentResponse : INIntentResponse


Create an instance of this class when you are:

  • Confirming your app can play the media.

  • Handling the request to play the media.

To send private state data from your Intents app extension to your app, store the data in an NSUserActivity object and include the object when creating the INPlayMediaIntentResponse instance.


Creating a Play Media Intent Response

Providing the Response Code

var code: INPlayMediaIntentResponseCode

A response code that indicates whether the app can play the media.

enum INPlayMediaIntentResponseCode

Codes returned by an app or Intents app extension when handling or confirming a play media intent.

Managing Now-Playing Information

var nowPlayingInfo: [String : Any]?

The now-playing information, such as title and artwork, for the media.


Inherits From

Conforms To

See Also

Playable Media Intents

Playing Media Through Siri Shortcuts

Play audio and video from your app using media intent shortcuts.

protocol INPlayMediaIntentHandling

The interface an object implements to confirm and handle play media intents.

class INPlayMediaIntent

An intent that contains information about media playable from your app.