---
title: Using MusicKit to integrate with Apple Music
framework: musickit
role: sampleCode
role_heading: Sample Code
path: sample-code/musickit/using-musickit-to-integrate-with-apple-music
---

# Using MusicKit to integrate with Apple Music

Find an album in Apple Music that corresponds to a CD in a user’s collection, and present the information for the album.

## Overview

Overview note: This sample code project is associated with WWDC21 session 10294: Meet MusicKit for Swift. Configure the sample code project This sample code project must be run on a physical device. Before you run the sample code project in Xcode, perform the following steps: In the Project navigator, select the project and click the Signing & Capabilities tab. Select your developer team from the Team menu. Choose a new bundle identifier for the MusicAlbums target, and enter it in the Bundle Identifier field. The bundle identifier within the project has an associated App ID, so you need a unique identifier to create your own App ID. Use a reverse-DNS format for your identifier, as Preparing your app for distribution describes. In Safari, visit the Certificates, Identifiers, and Profiles section of the developer web site. Select Identifiers and click the Add button to create a new App ID for MusicAlbums. Follow the steps until you reach the Register an App ID page. For the Bundle ID, select Explicit, and enter the bundle identifier from step 2. Click the App Services tab, and select the MusicKit checkbox. Complete the App ID creation process. After creating your App ID, your Xcode project needs no additional configuration. The MusicKit App Service is a run-time service that automatically associates with your app’s bundle ID.

## See Also

### Essentials

- [Using Automatic Developer Token Generation for Apple Music API](musickit/using-automatic-token-generation-for-apple-music-api.md)
- [NSAppleMusicUsageDescription](bundleresources/information-property-list/nsapplemusicusagedescription.md)
