<!--
{
  "availability" : [
    "iOS: 10.1.0 -",
    "iPadOS: 10.1.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaPlayer",
  "identifier" : "/documentation/MediaPlayer/MPMusicPlayerController/setQueue(with:)-1izmj",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Media Player"
    ],
    "preciseIdentifier" : "c:objc(cs)MPMusicPlayerController(im)setQueueWithDescriptor:"
  },
  "title" : "setQueue(with:)"
}
-->

# setQueue(with:)

Set the music player’s playback queue using media items that fit the queue descriptor properties.

```
func setQueue(with descriptor: MPMusicPlayerQueueDescriptor)
```

## Parameters

`descriptor`

A queue descriptor the system uses to add media items to the playback queue.

## Discussion

To begin playback after establishing a playback queue, call [`prepareToPlay()`](/documentation/MediaPlayer/MPMediaPlayback/prepareToPlay()).

---

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)