<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SiriKit",
  "identifier" : "/documentation/Intents/INMediaDestinationReference/library()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Intents"
    ],
    "preciseIdentifier" : "c:objc(cs)INMediaDestination(cm)libraryDestination"
  },
  "title" : "library()"
}
-->

# library()

Creates a new library destination for the media item.

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

## Return Value

A new [`INMediaDestinationReference`](/documentation/Intents/INMediaDestinationReference) object or `nil` if unable to create.

## 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.

---

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)