---
title: SHMediaLibrary
framework: ShazamKit
role: symbol
role_heading: Class
platforms: [iOS 15.0+, iPadOS 15.0+, Mac Catalyst 15.0+, macOS 12.0+, tvOS 15.0+, visionOS 1.0+, watchOS 8.0+]
path: shazamkit/shmedialibrary
---

# SHMediaLibrary

An object that represents the user’s Shazam library.

## Declaration

```swift
class SHMediaLibrary
```

## Overview

Overview Use SHMediaLibrary to add matched songs from the Shazam catalog to the user’s Shazam library. note: There’s no system permission necessary to write to the user’s Shazam library. Consider requesting permission from the user before adding songs to the library.

## Topics

### Adding a matched song to the library

- [default](shazamkit/shmedialibrary/default.md)
- [add(_:completionHandler:)](shazamkit/shmedialibrary/add(_:completionhandler:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Update the user’s Shazam library

- [SHLibrary](shazamkit/shlibrary.md)
