<!--
{
  "availability" : [
    "Xcode: 16.0.0 -",
    "iOS: 14.0.0 -"
  ],
  "documentType" : "article",
  "framework" : "SiriKit",
  "identifier" : "/documentation/SiriKit/managing-audio-with-sirikit",
  "metadataVersion" : "0.1.0",
  "role" : "sampleCode",
  "title" : "Managing Audio with SiriKit"
}
-->

# Managing Audio with SiriKit

Control audio playback and handle requests to add media using SiriKit Media Intents.

## Overview

> Note: This sample code project is associated with WWDC 2020 session [Expand Your SiriKit Media Intents to More Platforms](https://developer.apple.com/videos/play/wwdc2020/10061/).

### Configure the Sample Code Project

Before you run the sample code project in Xcode:

1. Create an App Group for `com.example.apple-samplecode.ControlAudio.Shared` in your developer portal.
2. Create an App ID for `com.example.apple-samplecode.ControlAudio` in your developer portal and enable it for App Groups, specifying the group you created in the previous step. Additionally, enable SiriKit.
3. Create a Music ID for `music.com.example.apple-samplecode.ControlAudio` in your developer portal.
4. Create a Key for the MusicKit service and create a developer token. For more information on this process, see [Generating Developer Tokens](doc://com.apple.documentation/documentation/AppleMusicAPI/generating-developer-tokens).
5. Copy the developer token to the `developerToken` variable in the `AppleMusicAPIController.swift` file.
6. Create a provisioning profile for `com.example.apple-samplecode.ControlAudio` and `com.example.apple-samplecode.ControlAudio.ControlAudioExtension` in your developer portal.
7. Associate the provisioning profiles with the project in Xcode signing settings.

---

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)