What should I know about MusicKit to list and play music?
Asked on 07/31/2024
1 search
To list and play music using MusicKit, you should be aware of a few key aspects:
-
Generic Media Assets: In iOS 17.2, Apple introduced song and podcast assets, which are categories of assets focusing on the music and podcasts you listen to on Apple Music and Apple Podcasts. This is extended in iOS 18 to support other media applications that deliver music or podcast content to users. These assets include the title of the media, artist name, album name, app icon, and a timestamp. You can retrieve and display these assets in your app by converting them into an async image using the app icon of the app that was used to consume the media.
-
Now Playing API: For more detailed information and control over media playback, you should refer to the Now Playing API. This API allows you to manage and control media playback within your app.
-
Design Considerations: When designing your app, consider using movement and animation to guide users to interactive elements, such as the music library. For example, a pulsing stroke outline around the music icon can subtly guide users to tap on it. Additionally, custom gestures that mimic real-world actions (like a DJ holding headphones to one ear to preview the next track) can enhance the user experience.
For more detailed information, you can refer to the following sessions from WWDC:
These sessions provide insights into handling media assets and designing interactive experiences for music playback.

Enhanced suggestions for your journaling app
Find out how your journaling app can display journaling suggestions with richer content from the system. Explore new types of available content like state of mind data, reflection prompts, and support for third-party media content and motion-based activities.

Enhance the immersion of media viewing in custom environments
Extend your media viewing experience using Reality Composer Pro components like Docking Region, Reverb, and Virtual Environment Probe. Find out how to further enhance immersion using Reflections, Tint Surroundings Effect, SharePlay, and the Immersive Environment Picker.

Design great visionOS apps
Find out how to create compelling spatial computing apps by embracing immersion, designing for eyes and hands, and taking advantage of depth, scale, and space. We’ll share several examples of great visionOS apps and explore how their designers approached creating new experiences for the platform.