---
title: library()
framework: intents
role: symbol
role_heading: Type Method
path: intents/inmediadestinationreference/library()
---

# library()

Creates a new library destination for the media item.

## Declaration

```swift
class func library() -> Self
```

## Return Value

Return Value A new INMediaDestinationReference object or nil if unable to create.

## Discussion

Discussion A library is a generic concept that you must define for your app. For example, in Apple Music, it’s the Apple Music library, while in Podcasts, it’s the user’s subscribed podcasts.

## See Also

### Creating a Media Destination Object

- [playlistDestination(withName:)](intents/inmediadestinationreference/playlistdestination(withname:).md)
