---
title: "setQueue(with:)"
framework: mediaplayer
role: symbol
role_heading: Instance Method
path: "mediaplayer/mpmusicplayercontroller/setqueue(with:)-8x6xb"
---

# setQueue(with:)

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

## Declaration

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

## Parameters

- `storeIDs`: An array of store identifiers associated with the media items to add to the queue.

## Discussion

Discussion To begin playback after establishing a playback queue, call prepareToPlay().

## See Also

### Setting up a playback queue

- [setQueue(with:)](mediaplayer/mpmusicplayercontroller/setqueue(with:)-5rii3.md)
- [setQueue(with:)](mediaplayer/mpmusicplayercontroller/setqueue(with:)-xlwk.md)
- [setQueue(with:)](mediaplayer/mpmusicplayercontroller/setqueue(with:)-1izmj.md)
