---
title: "add(_:to:)"
framework: musickit
role: symbol
role_heading: Instance Method
path: "musickit/musiclibrary/add(_:to:)"
---

# add(_:to:)

Adds an item to the end of an existing playlist.

## Declaration

```swift
@discardableResult func add<MusicItemType>(_ item: MusicItemType, to playlist: Playlist) async throws -> Playlist where MusicItemType : MusicPlaylistAddable
```

## Return Value

Return Value The updated playlist.
