musickitlisted
Install: claude install-skill thiennc-tesoglobal/ios-skills
# MusicKit
Search the Apple Music catalog, manage playback with `ApplicationMusicPlayer`,
check subscriptions, and publish Now Playing metadata via `MPNowPlayingInfoCenter`
and `MPRemoteCommandCenter`.
## Contents
- [Setup](#setup)
- [Workflow](#workflow)
- [Authorization](#authorization)
- [Catalog Search](#catalog-search)
- [Subscription Checks](#subscription-checks)
- [Playback with ApplicationMusicPlayer](#playback-with-applicationmusicplayer)
- [Queue Management](#queue-management)
- [Now Playing Info](#now-playing-info)
- [Remote Command Center](#remote-command-center)
- [Common Mistakes](#common-mistakes)
- [Review Checklist](#review-checklist)
- [References](#references)
## Workflow
1. Verify the MusicKit App Service, bundle identifier, purpose string, and background-audio mode before debugging code.
2. Request authorization, then model every non-authorized state explicitly.
3. Search or load catalog content and check `MusicSubscription.current` before queueing playback.
4. Choose `ApplicationMusicPlayer` for app-scoped playback; wire Now Playing and remote commands only when the app owns those surfaces.
5. Test authorized, denied, unsubscribed, offline, queue failure, interruption, and track-change states. Fix the smallest failing layer, restore the fixture, and rerun the same state matrix.
## Setup
### Project Configuration
1. Enable the **MusicKit App Service** for the app's explicit bundle ID in the Apple Developer portal so MusicKit can generate developer