What should I know about MusicKit to list and play music?

Generated on 7/31/2024

1 search

To list and play music using MusicKit, you should be aware of a few key aspects:

  1. 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.

  2. 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.

  3. 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

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

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

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.

Migrate your TVML app to SwiftUI

Migrate your TVML app to SwiftUI

SwiftUI helps you build great apps on all Apple platforms and is the preferred toolkit for bringing your content into the living room with tvOS 18. Learn how to use SwiftUI to create familiar layouts and controls from TVMLKit, and get tips and best practices.

Meet AccessorySetupKit

Meet AccessorySetupKit

Elevate your accessory setup experience with AccessorySetupKit. Display a beautiful pairing dialog with an image of your Bluetooth or Wi-Fi accessory — no trip to the Settings app required. Discover how to improve privacy by pairing only your app with an accessory. And learn how you can migrate existing accessories so they can be managed by AccessorySetupKit.

Build compelling spatial photo and video experiences

Build compelling spatial photo and video experiences

Learn how to adopt spatial photos and videos in your apps. Explore the different types of stereoscopic media and find out how to capture spatial videos in your iOS app on iPhone 15 Pro. Discover the various ways to detect and present spatial media, including the new QuickLook Preview Application API in visionOS. And take a deep dive into the metadata and stereo concepts that make a photo or video spatial.

Bring your app to Siri

Bring your app to Siri

Learn how to use App Intents to expose your app’s functionality to Siri. Understand which intents are already available for your use, and how to create custom intents to integrate actions from your app into the system. We’ll also cover what metadata to provide, making your entities searchable via Spotlight, annotating onscreen references, and much more.

What’s new in StoreKit and In-App Purchase

What’s new in StoreKit and In-App Purchase

Learn how to build and deliver even better purchase experiences using the App Store In-App Purchase system. We’ll demo new StoreKit views control styles and new APIs to improve your subscription customization, discuss new fields for transaction-level information, and explore new testability in Xcode. We’ll also review an important StoreKit deprecation.