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

# setQueue(with:)

Sets a music player’s playback queue using with media items identified by the store identifiers.

```
func setQueue(with storeIDs: [String])
```

## Parameters

`storeIDs`

An array of store identifiers associated with the media items to add to the 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)