<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaPlayer",
  "identifier" : "/documentation/MediaPlayer/MPMediaPickerControllerDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Media Player"
    ],
    "preciseIdentifier" : "c:objc(pl)MPMediaPickerControllerDelegate"
  },
  "title" : "MPMediaPickerControllerDelegate"
}
-->

# MPMediaPickerControllerDelegate

The protocol you implement so that a media item picker can respond to a user making media item selections.

```
protocol MPMediaPickerControllerDelegate : NSObjectProtocol
```

## Overview

The delegate for a media item picker can respond to a user making media item selections. The delegate is also responsible for dismissing the media item picker from the parent view controller. The methods in this protocol are optional.

[`MPMediaItem`](/documentation/MediaPlayer/MPMediaItem) describes the media items and [`MPMediaPickerController`](/documentation/MediaPlayer/MPMediaPickerController) describes the media item pickers.

## Topics

### Responding to user actions

[`-  mediaPicker:didPickMediaItems:`](/documentation/MediaPlayer/MPMediaPickerControllerDelegate/mediaPicker(_:didPickMediaItems:))

A method that the system calls when a user selects a set of media items.

[`-  mediaPickerDidCancel:`](/documentation/MediaPlayer/MPMediaPickerControllerDelegate/mediaPickerDidCancel(_:))

A method that the system calls when a user taps Cancel to dismiss a media item picker.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)