Apple Music API

RSS for tag

Apple Music API integrates streaming music with Apple Music content.

Posts under Apple Music API tag

200 Posts

Post

Replies

Boosts

Views

Activity

Musickit SDK for Android broken after Apple Music app update
Hi, The Musickit SDK for Android seems to be broken after the Apple Music app update from last week. We are launching the intent like this: AuthIntentBuilder aib = authManager.createIntentBuilder(appleTokenProvider.getDeveloperToken()); Intent intent = aib.build(); authLauncher.launch(intent); A new Apple Music UI is shown. The user is asked to login with email and password. However, after succesfull login the intent returns the error USER_CANCELLED for authManager.handleTokenResult(data); This was not the case before the latest Apple Music app update. The only workaround is to logout in the Apple Music app, then retry to launch the intent in our app. This has to be done every time the music user token expires. Any ETA on fixing this issue?
15
5
3.8k
2d
Apple Music off-device authorization for Android TV / WebOS — supported integration and client registration
Hello, I am developing an application that integrates with Apple Music to provide a personalized music video experience for Apple Music subscribers. We are working on support for many devices like Android TV / Google TV / WebOS / etc. and would like to implement an authorization experience suitable for a television, where entering account credentials with a remote control is cumbersome. Intended authorization flow We would like to implement the following experience: The application on the TV displays a QR code or short activation code. The user scans the QR code with their phone and opens an Apple-hosted authentication and authorization page. The user signs in to their Apple Account if necessary and approves Apple Music access for the application on the TV. The TV application receives or retrieves the resulting authorization and can use it for the supported Apple Music functionality. The objective is for the TV application itself to be authorized following approval on the phone, with no need to enter the Apple Account credentials on the television. Relevant implementation evidence found on Apple’s website While researching this integration, we examined JavaScript publicly served by link.apple.com. In the following OAuth view bundle, we observed these identifiers: PartnerAuthorizationRequest isOffDeviceOAuth2Flow DEVICE_CODE Source: Apple-hosted OAuth view bundle — oauth-views-OAuth-vue.4db9105e.js In the associated OAuth initializer bundle, we observed properties including: client_id scope response_type Source: Apple-hosted OAuth initializer bundle — oauth-views-OAuthInitializer-vue.23605d03.js These elements suggest that Apple’s authorization interface includes an off-device authorization path associated with partner clients. We understand that these implementation details are not public API documentation and do not establish whether this flow is available to third-party developers. We are looking for the officially supported integration and enrollment process, if one is available. Clarification requested 1. Availability for third-party TV applications Does Apple offer a supported Apple Music authorization flow of this kind for third-party applications running on non-Apple devices? If the observed flow is limited to certain integrations or partners, what are the eligibility requirements for obtaining access? 2. Client registration and account configuration What is the official process for registering or obtaining a client_id authorized to use this flow? We have reviewed the standard MusicKit configuration involving Media IDs, Media Services keys, App Services and Capability Requests, but have not identified the configuration or application process for off-device authorization. Could you clarify whether this requires: A standard MusicKit Media ID and Media Services key; An additional service configuration or managed capability request in the Apple Developer account; A separate OAuth client registration; Or approval through an Apple Music partner program? 3. Supported integration documentation If this integration is available, where can we obtain the documentation or SDK covering: The required client configuration, request parameters and permitted scopes; Creation of the authorization request and the QR code or activation link; The mechanism by which the TV checks for completion or receives the result; The resulting token type, its intended use, and its expiration or reauthorization requirements? In particular, we would appreciate clarification on whether the resulting authorization provides a Music User Token usable by the TV application, or another token that requires a documented exchange. 4. Apple Music access on the authorized TV Which Apple Music APIs or SDKs can consume the resulting authorization? We would like to confirm its supported use with Apple Music API and MusicKit for Android, including any separate requirements for playback on the TV. Our intended design is for authorization to be issued for the TV application, rather than transferring a Music User Token issued for the phone. If this access is handled outside the standard MusicKit developer workflow, could you please identify the applicable program and enrollment process, or who to route this request to the Apple Music team responsible for partner authorization and connected-device integrations? Thank you for helping us identify the supported path for this integration. Louis
0
0
431
2d
MusicKit for Android - support or cancel it
We all know the state of MusicKit SDK for Android is catastrophic - it's buggy, it's lacking features and it has not been updated in ages. It's sad though, as on Android there is (and this came as quite a surprise to me) no real alternative if you want to build an app with music content from a streaming service. So why, really why, does Apple not do anything in this area? Just give us an updated version of the SDK and we can continue on building apps that work on iOS and on Android.
0
0
266
4d
MusicKit tvOS — Some personal library songs fail with Error Code 6, while others play successfully
Hi everyone, I’m developing a native Apple TV application using MusicKit for Swift. The app provides a custom interface for browsing and playing the user’s personal Apple Music library. The application was working correctly for several months, but recently certain songs from the user’s personal library have stopped playing. I’ve been investigating this issue extensively and have reproduced it in a completely separate, minimal tvOS test application. The issue I retrieve songs using MusicLibraryRequest() and play them using ApplicationMusicPlayer. Some songs play successfully, while others consistently fail during playback preparation with: `MPMusicPlayerControllerErrorDomain Code=6 "Prepare to play failed"` The underlying errors include : NSCocoaErrorDomain Code=4099 Example of a failing song Michael Jackson — Bad (2012 Remaster) Library song ID: i.ldDOAp0UrAa62J Successfully retrieved using MusicLibraryRequest() Fails when queued with ApplicationMusicPlayer Also fails with SystemMusicPlayer Example of a working song Harry Nilsson — Everybody’s Talkin’ (1971 Mix) Library song ID: i.WmYQp9PcdZ4Y0E Retrieved using the exact same MusicLibraryRequest() Successfully plays using ApplicationMusicPlayer Both songs have library identifiers beginning with i.. What I’ve tested ApplicationMusicPlayer with prepareToPlay() followed by play(). SystemMusicPlayer with the same library song. Direct play() without explicitly calling prepareToPlay(). Retrieving songs directly using MusicLibraryRequest(), rather than accessing them through albums. A completely separate minimal tvOS application. An older version of my application’s code, recompiled using the current Xcode version. The issue persists across these tests. Interestingly, the corresponding Apple Music catalog song plays successfully when retrieved through MusicCatalogSearchRequest. However, replacing library songs with catalog equivalents is not an acceptable solution because the application needs to support users’ actual personal libraries, including imported music. Important observation The exact same failing song plays correctly on the same Apple TV and Apple Music account in: The official Apple Music application. Sleeve, another third-party Apple TV music player. This suggests that the song itself is playable and that another third-party application can successfully initiate playback. Environment Platform: tvOS Device: Physical Apple TV Framework: MusicKit for Swift Apple Music authorization: Granted MusicKit App Service: Enabled Signing: Automatic, using a paid Apple Developer account Question Is there a known issue with resolving or playing certain personal library songs through MusicKit on tvOS? Are there additional playback parameters, library synchronization requirements, or recommended queue configurations that could explain why some MusicLibraryRequest() items fail while others work? Has anyone encountered a similar issue or found a workaround that preserves playback of the user’s actual library items? Any guidance would be greatly appreciated. Thank you!
0
0
288
4d
MusicTokenRequestError.unknown for some authorized, subscribed users
A small number of our users can’t connect Apple Music because DefaultMusicTokenProvider.userToken(for:options:) always throws MusicTokenRequestError.unknown. Most users connect without problems and we can’t reproduce the failure on any of our own accounts. Flow: let status = await MusicAuthorization.request() // .authorized let subscription = try await MusicSubscription.current // canPlayCatalogContent == true let provider = DefaultMusicTokenProvider() let developerToken = try await provider.developerToken(options: []) // succeeds let userToken = try await provider.userToken(for: developerToken, options: []) // throws .unknown On failure we retry once with options: .ignoreCache for both the developer token and the user token. The retry fails in the same way. What we see on affected devices: MusicAuthorization.currentStatus == .authorized MusicSubscription.current.canPlayCatalogContent == true The developer token is returned successfully. userToken(for:) throws MusicTokenRequestError.unknown. The NSError has code 0 and the localized description “Unknown error”, and there is no NSUnderlyingError. The ignoreCache retry fails after anywhere from about 10 ms to 2.5 s, so it sometimes appears to go out to the network. For a given account it fails every time: across days, app versions, and after reinstalling both our app and the Music app. Apple Music plays normally in the Music app for these users. Ruled out so far: iOS version: seen on iOS 26.6.1 and 27.2. Device model: seen on iPhone 13 and iPhone 14 Plus. Region: seen in Hungary, Italy, Romania and Japan. Subscription type: one affected user has an individual trial. A family member with her own individual trial on a separate account connects without problems. Family Sharing in general: family plan members connect fine for us. Questions: What conditions cause userToken(for:) to return .unknown instead of a specific case such as .userNotSignedIn, .permissionDenied or .privacyAcknowledgementRequired? Is there a way to get more detail about the cause? Is there a step affected users can take to fix it?
1
1
380
5d
App-level volume for MusicKit ApplicationMusicPlayer on Mac Catalyst
Our music player plays library and Apple Music catalog content with MusicKit's ApplicationMusicPlayer. On the Mac, we want a volume slider that changes only our app's playback level, like the slider in Music.app. We found no supported way to do this: ApplicationMusicPlayer and MusicPlayer have no volume property. The audio plays in com.apple.MediaPlayer.RemotePlayerService, not in our process, so we cannot change the stream level. MPVolumeView and the deprecated MPMusicPlayerController.volume control the system output volume, not the app's level. AVPlayer cannot play Apple Music catalog content. Questions: Is there a supported API to set the playback volume of ApplicationMusicPlayer on macOS or Mac Catalyst? If there is none, what does Apple recommend for Mac apps that need an app-level volume control for MusicKit playback?
2
0
674
1w
Playing Apple Music / MusicKit videos on Apple TV
Hello, Apple currently does not provide any option to play MusicKit catalog videos through the standard Apple Music API nor any AVPlayer option on any platform. The only solution to play MusicKit videos is to use MusicKit on the Web through a WKWebView. This comes with a lot of constraints for developing native Apps and trying to perfectly integrate with the OS. tvOS do not support WebKit, meaning we can't use a WKWebView and MusicKit on the Web. We have no known way to develop an Apple TV App to play Apple Music videos. Is there any chance Apple will soon : integrate videos in Apple Music API ? or, at least, make WebKit at least available for use with MusicKit on the Web ? Thank you.
1
0
464
2w
Apple music kit android
Android App Compatibility This app isn't 16 KB compatible. RELRO alignment check failed. This warning is showing because this is a debuggable app which is currently being tested. If you are not the developer, please report this to the developer and ask for a non-debuggable pp. This app isn't 16 KB compatible. Please follow the steps on https://developer .android.com/16kb-page-size. The following libraries are not 16 KB aligned: • lib/arm64-v8a/libappleMusicSDK.so : RELRO segment not aligned
0
1
424
3w
Guideline 5.2.5: Apple Music previews as the subject of a music quiz
Hello, I'm building an iOS music quiz game. Players hear a song and answer a question about it, so the song itself is the content of the question, never background music. Each answer screen names the song and links to it on Apple Music. Non-subscribers would hear the catalog 30-second previews, and Apple Music subscribers the full songs through MusicKit (ApplicationMusicPlayer, with standard playback controls). Guideline 5.2.5 says previews "may not be used for their entertainment value (e.g. as the soundtrack to a game)", and the MusicKit terms say not to monetize access to Apple Music. Two questions: Is a preview that is the subject of a quiz question (not a soundtrack) an acceptable use for non-subscribers? Can such a game be a paid app or offer In-App Purchases, as long as the music is only previews or the player's own subscription? Any pointer to the right documentation or team would be appreciated. Thank you!
0
0
391
3w
Using MusicKit to display a user’s currently playing Apple Music track
Hello, I’m evaluating a possible MusicKit integration and would like to clarify whether the following use is permitted. With the user’s explicit and revocable consent, our iOS app would read the song currently playing in Apple Music while our app is active and display the song title and artist to other users of our application. Our app would not play, stream, host, download or redistribute Apple Music audio. Music playback would remain entirely within Apple Music. When our app is closed, it would stop accessing Apple Music. The last synchronized song may remain displayed until the user opens our app again, at which point the currently playing song would be refreshed. If a displayed song is tapped, the user would be redirected to Apple Music. We are happy to follow Apple’s required formatting, attribution and linking rules. Album artwork is not required and can be omitted if necessary. The Apple Music functionality itself would remain free. Any monetization would relate only to separate features of the application. Could someone clarify: Is this use permitted under the MusicKit / Apple Music requirements? May the current song title and artist be displayed to other users in this way? Which official Apple framework/API is recommended for detecting the song currently playing in Apple Music while our app is active? Are there specific attribution or linking requirements for this use? Thank you.
1
0
739
3w
Can’t generate MusicKit developer tokens on 27.2 b2
On both iOS & macOS 27.2 Beta 2 the call: let token = try await MusicDataRequest.tokenProvider.developerToken(options: [.ignoreCache]) is throwing an error. I can reproduce this on all of my 27.2 Beta 2 devices and I have users worldwide reaching out to me with this issue. The error that gets thrown is: Unknown error "Error returned from daemon: Error Domain=com.apple.accounts Code=9 "(null)"" Have raised FB24895830.
3
2
450
3w
Breaking change in Apple Music Recently Played API behavior
The Apple Music Recently Played API appears to have changed its behavior on 2026-08-05/2026-08-06. The endpoint no longer reports songs that are saved in a user's library. This impacts music tracking applications that rely on this API to retrieve listening history. Currently, tracks only appear in the Recently Played response when users stream them directly from the Apple Music catalog. If a user plays a song from their personal library, the playback is not reported by the endpoint and cannot be tracked. This is a breaking change that significantly affects existing integrations, but we could not find any announcement in the release notes or updates to the documentation regarding this behavior change. Could you please confirm whether this change is intentional? If so, we would appreciate updated documentation or guidance on how apps should handle tracking playback from a user's library.
10
6
2.1k
3w
MusicKit API — Compatibility question regarding user-initiated scoring method
Hi everyone, I'm building Sidetick, a concert ticketing and cultural discovery platform. I have an active Apple Developer Program account with MusicKit access. I want to implement the following flow and need to know if it complies with the MusicKit License Agreement: User authenticates via MusicKit (explicit OAuth consent) We read their heavy-rotation and library/artists in memory We calculate a fan affinity score per artist (e.g. "480 XP with Angèle") — entirely in-memory, never written to our DB We show the user: "We found these artists — which ones do you want to follow on Sidetick?" User explicitly picks their favorites ALL Apple Music API data is immediately deleted from our systems What we store is only the user's Sidetick declaration: {artist: "Angèle", xp: 480} — no Apple Music raw data retained After this, ALL gamification (fan ranking, ticket priority, rewards) is based exclusively on Sidetick first-party actions (ticket purchases, attended concerts, referrals) — zero Apple Music data involved. The intent: MusicKit is used as a one-time discovery bootstrap to help users identify which artists to follow on Sidetick. Apple Music data is never stored, never shared with third parties, never used for advertising. My questions: Is this use case compatible with the MusicKit License Agreement? Is storing the calculated XP score (after deleting the source Apple Music data) considered retaining Apple Music data? Is there a specific clause we should be careful about? Thanks in advance — any Apple engineer or experienced MusicKit dev input is very welcome. =D
0
0
173
4w
Tracks missing from Apple Music API listening history
I have a product that relies on the Apple Music API's "recently played tracks" endpoint. Recently, a few users are reporting that there are songs missing from their history. I was able to observe this myself—the issue corrected itself after re-authenticating with Apple Music, but unfortunately for at least one user this is not helping in their case. What's odd is that there is some inconsistency about what shows in the recently played tracks endpoint. Some examples My own account: ✅ Music from my playlists ✅ Albums and singles ✅ Apple editorial playlists ❌ Playlists created by other users User 1: ❌ Music from their playlists ✅ Albums and singles ❌ Apple editorial playlists ❌ Playlists created by other users In most cases, all four of these would appear in the recent tracks API. What could cause these tracks to be missing from the listening history endpoint? Listening history is already enabled for the devices they're using, but the songs are appearing inconsistently.
1
3
573
Sep ’26
Music.app hangs on Library tab with Sync Library enabled — iOS 27.2 beta
On iPhone 17 Pro Max running iOS 27.2 beta (24B5084k), Music.app hangs and is watchdog-terminated when opening the Library tab, but only with Sync Library enabled. to reproduce: 1. Settings › Apps › Music › Sync Library OFF — app works normally. 2. Enable Sync Library, let it finish syncing. 3. Open Music and navigate to the Library tab. Result: The app freezes immediately and is terminated. Home, Radio and Search all play normally with Sync Library on — the hang is isolated to the Library tab. The stackshot from Analytics Data shows multiple threads blocked on a single thread, including com.apple.SwiftUI.AsyncRenderer, with the watchdog reporting "Failed to terminate gracefully after 5.0s". No VPN, no automatic downloads, no local files. The same Apple Music account works normally on iPadOS 26 and on Apple Music for Windows. 100% reproducible. Filed as FB24865181. Has anyone else hit this? If so, does your Music- analytics log show the same blocked-thread signature?
0
1
566
Sep ’26
Building a library playlist on macOS that mixes catalog songs and the user's own uploads in a fixed order – supported route, and how to know when an upload is registered?
Our sandboxed macOS app digitises audio cassettes and builds one playlist per cassette in the user's Apple Music library that follows the tape's order: catalog songs where a title was recognised, and the user's own recordings (AAC files the app exported from the tape) where it was not. The user has an Apple Music subscription and Sync Library on. On macOS every write on MusicLibrary is marked @available(macOS, unavailable) in the 26.5 SDK – add, add(_:to:), createPlaylist and edit (see thread 844114, which got no answer). So we build the playlist through Music.app's scripting interface: make new user playlist, duplicate <library track> to <playlist> for catalog songs, add <file> to <playlist> for own recordings. That works, with one exception that leads to our questions. What we observe Reproducible on macOS 26.6.2 / Music 26; a standalone AppleScript is at the end. A playlist built in one go from 14 subscription tracks keeps all 14. The same playlist with one local file added after the second track: all 15 entries are there right after the build and one second later. About 15 s later the playlist has 3 entries – the two catalog entries before the file, the file, and nothing that was added after it. No error anywhere. If the file has been in the library for several minutes before the playlist is built, everything stays. Adding it to the library and waiting 45 s is not enough. Meanwhile the track's cloud status stays unknown, and GET /v1/me/library/search?types=library-songs does not list it (checked for 10 minutes). Emptying the playlist and building it again ~30 s after the entries were removed keeps everything, every time. That is what we do today; it costs 30–40 s per import, and we have to tell the user that entries were removed and put back. Our reading: while the freshly added file is not yet registered in iCloud Music Library, the playlist as pushed to the server is cut at the first item the server cannot reference, and the next sync adopts the shorter list for cloud items while keeping the local-only item in place. Questions Is there a supported way for a macOS app to create a library playlist and add tracks to it? Specifically: is the Apple Music API (POST /v1/me/library/playlists with relationships.tracks, and POST /v1/me/library/playlists/{id}/tracks) the intended route from a macOS app holding a MusicKit user token, and can such a playlist reference the user's own uploaded songs by their library id (i.…)? After a local file has been added to the library (via Music.app's add, or any other supported way), how can an app learn that iCloud Music Library has registered it, and what its library song id is? A notification, a MusicKit property, an Apple Music API endpoint? We would wait on that signal instead of rebuilding. Is the removal described above expected behaviour? Catalog ids are re-resolved at import time via id, ISRC and search as recommended in thread 122110, so stale catalog ids are not the cause. Reproduction Needs Sync Library on, at least 14 subscription tracks in the library, and a local audio file the library does not know yet. Prints the counts after 1 s, 21 s and 41 s, then cleans up. on run argv set localFile to POSIX file (item 1 of argv) tell application "Music" set cloudTracks to (every track of library playlist 1 whose cloud status is subscription) set idsBefore to persistent ID of every track of library playlist 1 set pl to make new user playlist with properties {name:"Reconciliation repro"} repeat with i from 1 to 2 duplicate (item i of cloudTracks) to pl end repeat set fileTrack to add localFile to pl set fileID to persistent ID of fileTrack repeat with i from 3 to 14 duplicate (item i of cloudTracks) to pl end repeat set n0 to count of tracks of pl delay 1 set n1 to count of tracks of pl delay 20 set n2 to count of tracks of pl delay 20 set n3 to count of tracks of pl delete pl if fileID is not in idsBefore then delete (first track of library playlist 1 whose persistent ID is fileID) return "after build: " & n0 & ", after 1 s: " & n1 & ", after 21 s: " & n2 & ", after 41 s: " & n3 end tell end run Output here: after build: 15, after 1 s: 15, after 21 s: 3, after 41 s: 3.
0
0
416
Sep ’26
MusicKit on HarmonyOS — playback approach for a platform without an official SDK, licensing question
Hello Apple Developer community, I'm building an Apple Music client for HarmonyOS (Huawei's operating system) and would like to clarify the licensing and technical approach before submitting to a third-party app store (Huawei AppGallery). I've read the Apple Developer Program License Agreement and App Store Review Guideline 4.5.2, but there are platform-specific constraints I'd like to discuss. Background Apple currently does not provide a MusicKit SDK for HarmonyOS. The available options are: MusicKit for iOS/macOS — not applicable (different OS) MusicKit for Android — ships as proprietary .aar binaries that cannot be redistributed and are not compatible with HarmonyOS's runtime MusicKit JS — available, but HarmonyOS WebView does not support FairPlay or Widevine EME, so full-song DRM playback through MusicKit JS does not work on this platform The only Apple Music API access path available to a HarmonyOS app is the REST API (api.music.apple.com) with a Developer Token (JWT, ES256) and a Music User Token obtained through the MusicKit JS authorization flow running inside a WebView. The technical constraint To deliver full-song playback for subscribed Apple Music users on HarmonyOS, our app retrieves the HLS playback URL via the Apple Music API, downloads the encrypted media segments, and decrypts them using HarmonyOS's native DRM system (WisePlay, the only CDM available on the platform). MusicKit JS's FairPlay/Widevine CDM is not compatible with HarmonyOS — WisePlay is the sole DRM implementation the OS exposes. We are aware that Section 4.5.2 states: "You may not, and You may not permit Your end users to, download, upload, or modify any MusicKit Content" and "You may play MusicKit Content only as rendered by the MusicKit APIs or MusicKit JS" What we want to clarify Our playback implementation works as follows, and we want to confirm whether it is acceptable under the license terms: No download service is offered to users. The download is purely an internal playback mechanism — the app fetches encrypted segments, decrypts them in memory / a protected sandbox, and plays them via the system AVPlayer. There is no "download button," no offline library, no user-facing download feature. Decrypted files are ephemeral and protected. Decrypted media is written to the app's private sandbox (not accessible to users or other apps), played immediately, and deleted as soon as playback ends or the song is skipped. The decrypted file never persists beyond the current playback session. No file leakage. The decrypted content is never exposed via any sharing mechanism, file picker, or external storage. It exists only within the app's protected data directory for the duration of playback. Standard playback controls are preserved. Users initiate playback and can use play / pause / skip / seek — the same controls required by 4.5.2(i). No monetization of Apple Music access. The app does not charge for Apple Music playback, does not show ads around it, and does not collect or share user data. Our question Given that: Apple has no SDK presence on HarmonyOS, MusicKit JS DRM is technically non-functional on HarmonyOS WebView, the only way to deliver full-song playback to Apple Music subscribers on this platform is to decrypt the stream using the OS's native DRM (WisePlay) with strict ephemeral handling, is this playback approach acceptable under the Apple Developer Program License Agreement, provided that: decrypted content is never persisted, shared, or exposed to users, the app only serves subscribed Apple Music users with valid Music User Tokens, all usage remains within the scope of facilitating access to the user's own Apple Music subscription? We fully respect Apple's content protection requirements and are happy to adjust the implementation (e.g., stricter deletion timing, additional sandboxing, attestation) to comply. We just want to understand whether the fundamental approach — decrypting via the host OS's DRM because Apple's own CDMs are unavailable on this platform — is permissible, or whether Apple considers HarmonyOS out of scope for full-song playback entirely. Any guidance from the MusicKit team or community members who have dealt with non-Apple-platform constraints would be greatly appreciated. Thank you.
0
0
455
Sep ’26
Apple Music real-time DJ mixing: is there an API or entitlement beyond MusicKit?
Hello, I am developing an iOS app that uses MusicKit and ApplicationMusicPlayer to create automatic transitions between songs from Apple Music. The app already analyzes tracks using BPM, musical key and danceability, orders them for compatible transitions, and uses MusicPlayer.Transition.crossfade for playback. With the public MusicKit APIs, however, I have reached a limitation. ApplicationMusicPlayer manages the playback queue and crossfade internally. I cannot independently control the outgoing and incoming Apple Music tracks as two decks, which would be required for DJ-style transitions (for example, starting the incoming track while independently controlling the outgoing track, choosing precise mix points, and managing the two playback positions during the overlap). I experimented with MusicPlayer.Queue.Entry startTime and endTime, but changing the end point is not equivalent to having independent deck control and can result in the current track ending before the desired transition. I understand that Apple Music content is protected and that direct access to decoded audio samples may intentionally not be available through the public MusicKit APIs. I am not looking to download, extract, record, or export Apple Music audio. My use case is real-time playback only, for authenticated Apple Music subscribers. My questions are: Is there a public API that allows two Apple Music tracks to be independently controlled and mixed in real time? If not, is there a restricted entitlement, API, or developer program available for DJ/mixing applications? If this capability requires a commercial or technical partnership with Apple Music rather than a public API, is there an official channel through which a developer can request or discuss such access? I am aware that some third-party DJ applications provide real-time mixing with Apple Music, so I would like to understand whether there is an officially supported integration path for other developers, rather than trying to work around the limitations of ApplicationMusicPlayer. Thank you.
0
1
749
Aug ’26
Apple Music / MusicKit Commercial Integration Enquiry – Multiplayer Music Game
Hello, Could this please be forwarded to the team responsible for Apple Music / MusicKit commercial integrations, developer partnerships and licensing? I am currently assessing the feasibility of developing a commercial browser-based multiplayer music game and would like to understand whether Apple Music and MusicKit could support the proposed use case. At a high level, players would privately select tracks from the Apple Music catalogue within the game. Once selections are complete, the application would arrange the selected tracks for sequential playback through a shared host account/device. Players would then interact with those tracks through the game. The application would provide the game functionality and would not download, store or independently redistribute full music recordings. Before progressing with development, I would appreciate clarification on the following: Commercial game use: Is integration of the Apple Music catalogue and MusicKit playback functionality into a commercial multiplayer game permitted? If specific approval, licensing or a commercial agreement with Apple is required, what is the appropriate process? Monetisation: Can the game itself be monetised through subscriptions, one-off purchases/party passes or advertising, provided users are paying for the game functionality rather than access to Apple Music or its catalogue? Apple Music subscription requirements: Would the account providing full-track playback need an active Apple Music subscription? If so, would only the host/playback account require a subscription, while other participants could join the game, search/select tracks and vote without having an Apple Music subscription themselves? Commercial playback alternative: If an Apple Music subscription is required for full-track playback, does Apple offer any commercial, licensing or partnership arrangement whereby the game operator could fund the necessary playback rights directly, rather than requiring the host to hold an individual Apple Music subscription? Catalogue access: Can players search the Apple Music catalogue and select tracks from within the application without every participant individually authenticating with Apple Music or holding an Apple Music subscription? Track availability: Can MusicKit/API functionality confirm whether a selected track is available for playback in the host's storefront/territory before accepting the selection? Playback control: Can the application create and manage a temporary playback queue containing the selected tracks and initiate sequential playback through an authorised host account/device without requiring the host to manually locate and play each track in the Apple Music application? Audio previews: Are short audio previews available through Apple Music/MusicKit, and may these be used within a commercial multiplayer game to help users identify a track before selecting it? If so, are there restrictions on preview duration or monetised use? Multi-provider support: Would Apple's terms permit Apple Music to be offered as one of several supported music playback providers within the same application, allowing a host to choose Apple Music or another supported streaming service? Additional licensing: If full recordings continue to be delivered and played through Apple Music/MusicKit, would the game developer require any additional master recording, publishing, public-performance or other music licences directly from rights-holders or collecting societies? Web/browser implementation: As the initial product is intended to be browser-based rather than a native iOS application, can the above catalogue, authentication and playback functionality be implemented through MusicKit on the Web? Are there any material differences in commercial permissions or capabilities compared with a native MusicKit implementation? Scaling: Are there different MusicKit/API access, approval, rate-limit or commercial requirements if the application progresses from development/testing to a publicly available commercial product with a significant user base? At this stage I am primarily trying to establish whether a compliant technical and commercial model exists before investing in development. If this enquiry would be better directed to an Apple Music partnership, MusicKit, licensing or business-development team, I would appreciate being pointed towards the appropriate contact. I would be happy to provide further technical details about the proposed integration if required. Kind regards, Errol Brinkman
0
0
500
Aug ’26
Musickit SDK for Android broken after Apple Music app update
Hi, The Musickit SDK for Android seems to be broken after the Apple Music app update from last week. We are launching the intent like this: AuthIntentBuilder aib = authManager.createIntentBuilder(appleTokenProvider.getDeveloperToken()); Intent intent = aib.build(); authLauncher.launch(intent); A new Apple Music UI is shown. The user is asked to login with email and password. However, after succesfull login the intent returns the error USER_CANCELLED for authManager.handleTokenResult(data); This was not the case before the latest Apple Music app update. The only workaround is to logout in the Apple Music app, then retry to launch the intent in our app. This has to be done every time the music user token expires. Any ETA on fixing this issue?
Replies
15
Boosts
5
Views
3.8k
Activity
2d
Apple Music off-device authorization for Android TV / WebOS — supported integration and client registration
Hello, I am developing an application that integrates with Apple Music to provide a personalized music video experience for Apple Music subscribers. We are working on support for many devices like Android TV / Google TV / WebOS / etc. and would like to implement an authorization experience suitable for a television, where entering account credentials with a remote control is cumbersome. Intended authorization flow We would like to implement the following experience: The application on the TV displays a QR code or short activation code. The user scans the QR code with their phone and opens an Apple-hosted authentication and authorization page. The user signs in to their Apple Account if necessary and approves Apple Music access for the application on the TV. The TV application receives or retrieves the resulting authorization and can use it for the supported Apple Music functionality. The objective is for the TV application itself to be authorized following approval on the phone, with no need to enter the Apple Account credentials on the television. Relevant implementation evidence found on Apple’s website While researching this integration, we examined JavaScript publicly served by link.apple.com. In the following OAuth view bundle, we observed these identifiers: PartnerAuthorizationRequest isOffDeviceOAuth2Flow DEVICE_CODE Source: Apple-hosted OAuth view bundle — oauth-views-OAuth-vue.4db9105e.js In the associated OAuth initializer bundle, we observed properties including: client_id scope response_type Source: Apple-hosted OAuth initializer bundle — oauth-views-OAuthInitializer-vue.23605d03.js These elements suggest that Apple’s authorization interface includes an off-device authorization path associated with partner clients. We understand that these implementation details are not public API documentation and do not establish whether this flow is available to third-party developers. We are looking for the officially supported integration and enrollment process, if one is available. Clarification requested 1. Availability for third-party TV applications Does Apple offer a supported Apple Music authorization flow of this kind for third-party applications running on non-Apple devices? If the observed flow is limited to certain integrations or partners, what are the eligibility requirements for obtaining access? 2. Client registration and account configuration What is the official process for registering or obtaining a client_id authorized to use this flow? We have reviewed the standard MusicKit configuration involving Media IDs, Media Services keys, App Services and Capability Requests, but have not identified the configuration or application process for off-device authorization. Could you clarify whether this requires: A standard MusicKit Media ID and Media Services key; An additional service configuration or managed capability request in the Apple Developer account; A separate OAuth client registration; Or approval through an Apple Music partner program? 3. Supported integration documentation If this integration is available, where can we obtain the documentation or SDK covering: The required client configuration, request parameters and permitted scopes; Creation of the authorization request and the QR code or activation link; The mechanism by which the TV checks for completion or receives the result; The resulting token type, its intended use, and its expiration or reauthorization requirements? In particular, we would appreciate clarification on whether the resulting authorization provides a Music User Token usable by the TV application, or another token that requires a documented exchange. 4. Apple Music access on the authorized TV Which Apple Music APIs or SDKs can consume the resulting authorization? We would like to confirm its supported use with Apple Music API and MusicKit for Android, including any separate requirements for playback on the TV. Our intended design is for authorization to be issued for the TV application, rather than transferring a Music User Token issued for the phone. If this access is handled outside the standard MusicKit developer workflow, could you please identify the applicable program and enrollment process, or who to route this request to the Apple Music team responsible for partner authorization and connected-device integrations? Thank you for helping us identify the supported path for this integration. Louis
Replies
0
Boosts
0
Views
431
Activity
2d
MusicKit for Android - support or cancel it
We all know the state of MusicKit SDK for Android is catastrophic - it's buggy, it's lacking features and it has not been updated in ages. It's sad though, as on Android there is (and this came as quite a surprise to me) no real alternative if you want to build an app with music content from a streaming service. So why, really why, does Apple not do anything in this area? Just give us an updated version of the SDK and we can continue on building apps that work on iOS and on Android.
Replies
0
Boosts
0
Views
266
Activity
4d
MusicKit tvOS — Some personal library songs fail with Error Code 6, while others play successfully
Hi everyone, I’m developing a native Apple TV application using MusicKit for Swift. The app provides a custom interface for browsing and playing the user’s personal Apple Music library. The application was working correctly for several months, but recently certain songs from the user’s personal library have stopped playing. I’ve been investigating this issue extensively and have reproduced it in a completely separate, minimal tvOS test application. The issue I retrieve songs using MusicLibraryRequest() and play them using ApplicationMusicPlayer. Some songs play successfully, while others consistently fail during playback preparation with: `MPMusicPlayerControllerErrorDomain Code=6 "Prepare to play failed"` The underlying errors include : NSCocoaErrorDomain Code=4099 Example of a failing song Michael Jackson — Bad (2012 Remaster) Library song ID: i.ldDOAp0UrAa62J Successfully retrieved using MusicLibraryRequest() Fails when queued with ApplicationMusicPlayer Also fails with SystemMusicPlayer Example of a working song Harry Nilsson — Everybody’s Talkin’ (1971 Mix) Library song ID: i.WmYQp9PcdZ4Y0E Retrieved using the exact same MusicLibraryRequest() Successfully plays using ApplicationMusicPlayer Both songs have library identifiers beginning with i.. What I’ve tested ApplicationMusicPlayer with prepareToPlay() followed by play(). SystemMusicPlayer with the same library song. Direct play() without explicitly calling prepareToPlay(). Retrieving songs directly using MusicLibraryRequest(), rather than accessing them through albums. A completely separate minimal tvOS application. An older version of my application’s code, recompiled using the current Xcode version. The issue persists across these tests. Interestingly, the corresponding Apple Music catalog song plays successfully when retrieved through MusicCatalogSearchRequest. However, replacing library songs with catalog equivalents is not an acceptable solution because the application needs to support users’ actual personal libraries, including imported music. Important observation The exact same failing song plays correctly on the same Apple TV and Apple Music account in: The official Apple Music application. Sleeve, another third-party Apple TV music player. This suggests that the song itself is playable and that another third-party application can successfully initiate playback. Environment Platform: tvOS Device: Physical Apple TV Framework: MusicKit for Swift Apple Music authorization: Granted MusicKit App Service: Enabled Signing: Automatic, using a paid Apple Developer account Question Is there a known issue with resolving or playing certain personal library songs through MusicKit on tvOS? Are there additional playback parameters, library synchronization requirements, or recommended queue configurations that could explain why some MusicLibraryRequest() items fail while others work? Has anyone encountered a similar issue or found a workaround that preserves playback of the user’s actual library items? Any guidance would be greatly appreciated. Thank you!
Replies
0
Boosts
0
Views
288
Activity
4d
MusicTokenRequestError.unknown for some authorized, subscribed users
A small number of our users can’t connect Apple Music because DefaultMusicTokenProvider.userToken(for:options:) always throws MusicTokenRequestError.unknown. Most users connect without problems and we can’t reproduce the failure on any of our own accounts. Flow: let status = await MusicAuthorization.request() // .authorized let subscription = try await MusicSubscription.current // canPlayCatalogContent == true let provider = DefaultMusicTokenProvider() let developerToken = try await provider.developerToken(options: []) // succeeds let userToken = try await provider.userToken(for: developerToken, options: []) // throws .unknown On failure we retry once with options: .ignoreCache for both the developer token and the user token. The retry fails in the same way. What we see on affected devices: MusicAuthorization.currentStatus == .authorized MusicSubscription.current.canPlayCatalogContent == true The developer token is returned successfully. userToken(for:) throws MusicTokenRequestError.unknown. The NSError has code 0 and the localized description “Unknown error”, and there is no NSUnderlyingError. The ignoreCache retry fails after anywhere from about 10 ms to 2.5 s, so it sometimes appears to go out to the network. For a given account it fails every time: across days, app versions, and after reinstalling both our app and the Music app. Apple Music plays normally in the Music app for these users. Ruled out so far: iOS version: seen on iOS 26.6.1 and 27.2. Device model: seen on iPhone 13 and iPhone 14 Plus. Region: seen in Hungary, Italy, Romania and Japan. Subscription type: one affected user has an individual trial. A family member with her own individual trial on a separate account connects without problems. Family Sharing in general: family plan members connect fine for us. Questions: What conditions cause userToken(for:) to return .unknown instead of a specific case such as .userNotSignedIn, .permissionDenied or .privacyAcknowledgementRequired? Is there a way to get more detail about the cause? Is there a step affected users can take to fix it?
Replies
1
Boosts
1
Views
380
Activity
5d
App-level volume for MusicKit ApplicationMusicPlayer on Mac Catalyst
Our music player plays library and Apple Music catalog content with MusicKit's ApplicationMusicPlayer. On the Mac, we want a volume slider that changes only our app's playback level, like the slider in Music.app. We found no supported way to do this: ApplicationMusicPlayer and MusicPlayer have no volume property. The audio plays in com.apple.MediaPlayer.RemotePlayerService, not in our process, so we cannot change the stream level. MPVolumeView and the deprecated MPMusicPlayerController.volume control the system output volume, not the app's level. AVPlayer cannot play Apple Music catalog content. Questions: Is there a supported API to set the playback volume of ApplicationMusicPlayer on macOS or Mac Catalyst? If there is none, what does Apple recommend for Mac apps that need an app-level volume control for MusicKit playback?
Replies
2
Boosts
0
Views
674
Activity
1w
Playing Apple Music / MusicKit videos on Apple TV
Hello, Apple currently does not provide any option to play MusicKit catalog videos through the standard Apple Music API nor any AVPlayer option on any platform. The only solution to play MusicKit videos is to use MusicKit on the Web through a WKWebView. This comes with a lot of constraints for developing native Apps and trying to perfectly integrate with the OS. tvOS do not support WebKit, meaning we can't use a WKWebView and MusicKit on the Web. We have no known way to develop an Apple TV App to play Apple Music videos. Is there any chance Apple will soon : integrate videos in Apple Music API ? or, at least, make WebKit at least available for use with MusicKit on the Web ? Thank you.
Replies
1
Boosts
0
Views
464
Activity
2w
Apple music kit android
Android App Compatibility This app isn't 16 KB compatible. RELRO alignment check failed. This warning is showing because this is a debuggable app which is currently being tested. If you are not the developer, please report this to the developer and ask for a non-debuggable pp. This app isn't 16 KB compatible. Please follow the steps on https://developer .android.com/16kb-page-size. The following libraries are not 16 KB aligned: • lib/arm64-v8a/libappleMusicSDK.so : RELRO segment not aligned
Replies
0
Boosts
1
Views
424
Activity
3w
Guideline 5.2.5: Apple Music previews as the subject of a music quiz
Hello, I'm building an iOS music quiz game. Players hear a song and answer a question about it, so the song itself is the content of the question, never background music. Each answer screen names the song and links to it on Apple Music. Non-subscribers would hear the catalog 30-second previews, and Apple Music subscribers the full songs through MusicKit (ApplicationMusicPlayer, with standard playback controls). Guideline 5.2.5 says previews "may not be used for their entertainment value (e.g. as the soundtrack to a game)", and the MusicKit terms say not to monetize access to Apple Music. Two questions: Is a preview that is the subject of a quiz question (not a soundtrack) an acceptable use for non-subscribers? Can such a game be a paid app or offer In-App Purchases, as long as the music is only previews or the player's own subscription? Any pointer to the right documentation or team would be appreciated. Thank you!
Replies
0
Boosts
0
Views
391
Activity
3w
Using MusicKit to display a user’s currently playing Apple Music track
Hello, I’m evaluating a possible MusicKit integration and would like to clarify whether the following use is permitted. With the user’s explicit and revocable consent, our iOS app would read the song currently playing in Apple Music while our app is active and display the song title and artist to other users of our application. Our app would not play, stream, host, download or redistribute Apple Music audio. Music playback would remain entirely within Apple Music. When our app is closed, it would stop accessing Apple Music. The last synchronized song may remain displayed until the user opens our app again, at which point the currently playing song would be refreshed. If a displayed song is tapped, the user would be redirected to Apple Music. We are happy to follow Apple’s required formatting, attribution and linking rules. Album artwork is not required and can be omitted if necessary. The Apple Music functionality itself would remain free. Any monetization would relate only to separate features of the application. Could someone clarify: Is this use permitted under the MusicKit / Apple Music requirements? May the current song title and artist be displayed to other users in this way? Which official Apple framework/API is recommended for detecting the song currently playing in Apple Music while our app is active? Are there specific attribution or linking requirements for this use? Thank you.
Replies
1
Boosts
0
Views
739
Activity
3w
Can’t generate MusicKit developer tokens on 27.2 b2
On both iOS & macOS 27.2 Beta 2 the call: let token = try await MusicDataRequest.tokenProvider.developerToken(options: [.ignoreCache]) is throwing an error. I can reproduce this on all of my 27.2 Beta 2 devices and I have users worldwide reaching out to me with this issue. The error that gets thrown is: Unknown error "Error returned from daemon: Error Domain=com.apple.accounts Code=9 "(null)"" Have raised FB24895830.
Replies
3
Boosts
2
Views
450
Activity
3w
Breaking change in Apple Music Recently Played API behavior
The Apple Music Recently Played API appears to have changed its behavior on 2026-08-05/2026-08-06. The endpoint no longer reports songs that are saved in a user's library. This impacts music tracking applications that rely on this API to retrieve listening history. Currently, tracks only appear in the Recently Played response when users stream them directly from the Apple Music catalog. If a user plays a song from their personal library, the playback is not reported by the endpoint and cannot be tracked. This is a breaking change that significantly affects existing integrations, but we could not find any announcement in the release notes or updates to the documentation regarding this behavior change. Could you please confirm whether this change is intentional? If so, we would appreciate updated documentation or guidance on how apps should handle tracking playback from a user's library.
Replies
10
Boosts
6
Views
2.1k
Activity
3w
MusicKit API — Compatibility question regarding user-initiated scoring method
Hi everyone, I'm building Sidetick, a concert ticketing and cultural discovery platform. I have an active Apple Developer Program account with MusicKit access. I want to implement the following flow and need to know if it complies with the MusicKit License Agreement: User authenticates via MusicKit (explicit OAuth consent) We read their heavy-rotation and library/artists in memory We calculate a fan affinity score per artist (e.g. "480 XP with Angèle") — entirely in-memory, never written to our DB We show the user: "We found these artists — which ones do you want to follow on Sidetick?" User explicitly picks their favorites ALL Apple Music API data is immediately deleted from our systems What we store is only the user's Sidetick declaration: {artist: "Angèle", xp: 480} — no Apple Music raw data retained After this, ALL gamification (fan ranking, ticket priority, rewards) is based exclusively on Sidetick first-party actions (ticket purchases, attended concerts, referrals) — zero Apple Music data involved. The intent: MusicKit is used as a one-time discovery bootstrap to help users identify which artists to follow on Sidetick. Apple Music data is never stored, never shared with third parties, never used for advertising. My questions: Is this use case compatible with the MusicKit License Agreement? Is storing the calculated XP score (after deleting the source Apple Music data) considered retaining Apple Music data? Is there a specific clause we should be careful about? Thanks in advance — any Apple engineer or experienced MusicKit dev input is very welcome. =D
Replies
0
Boosts
0
Views
173
Activity
4w
Tracks missing from Apple Music API listening history
I have a product that relies on the Apple Music API's "recently played tracks" endpoint. Recently, a few users are reporting that there are songs missing from their history. I was able to observe this myself—the issue corrected itself after re-authenticating with Apple Music, but unfortunately for at least one user this is not helping in their case. What's odd is that there is some inconsistency about what shows in the recently played tracks endpoint. Some examples My own account: ✅ Music from my playlists ✅ Albums and singles ✅ Apple editorial playlists ❌ Playlists created by other users User 1: ❌ Music from their playlists ✅ Albums and singles ❌ Apple editorial playlists ❌ Playlists created by other users In most cases, all four of these would appear in the recent tracks API. What could cause these tracks to be missing from the listening history endpoint? Listening history is already enabled for the devices they're using, but the songs are appearing inconsistently.
Replies
1
Boosts
3
Views
573
Activity
Sep ’26
Music.app hangs on Library tab with Sync Library enabled — iOS 27.2 beta
On iPhone 17 Pro Max running iOS 27.2 beta (24B5084k), Music.app hangs and is watchdog-terminated when opening the Library tab, but only with Sync Library enabled. to reproduce: 1. Settings › Apps › Music › Sync Library OFF — app works normally. 2. Enable Sync Library, let it finish syncing. 3. Open Music and navigate to the Library tab. Result: The app freezes immediately and is terminated. Home, Radio and Search all play normally with Sync Library on — the hang is isolated to the Library tab. The stackshot from Analytics Data shows multiple threads blocked on a single thread, including com.apple.SwiftUI.AsyncRenderer, with the watchdog reporting "Failed to terminate gracefully after 5.0s". No VPN, no automatic downloads, no local files. The same Apple Music account works normally on iPadOS 26 and on Apple Music for Windows. 100% reproducible. Filed as FB24865181. Has anyone else hit this? If so, does your Music- analytics log show the same blocked-thread signature?
Replies
0
Boosts
1
Views
566
Activity
Sep ’26
Building a library playlist on macOS that mixes catalog songs and the user's own uploads in a fixed order – supported route, and how to know when an upload is registered?
Our sandboxed macOS app digitises audio cassettes and builds one playlist per cassette in the user's Apple Music library that follows the tape's order: catalog songs where a title was recognised, and the user's own recordings (AAC files the app exported from the tape) where it was not. The user has an Apple Music subscription and Sync Library on. On macOS every write on MusicLibrary is marked @available(macOS, unavailable) in the 26.5 SDK – add, add(_:to:), createPlaylist and edit (see thread 844114, which got no answer). So we build the playlist through Music.app's scripting interface: make new user playlist, duplicate <library track> to <playlist> for catalog songs, add <file> to <playlist> for own recordings. That works, with one exception that leads to our questions. What we observe Reproducible on macOS 26.6.2 / Music 26; a standalone AppleScript is at the end. A playlist built in one go from 14 subscription tracks keeps all 14. The same playlist with one local file added after the second track: all 15 entries are there right after the build and one second later. About 15 s later the playlist has 3 entries – the two catalog entries before the file, the file, and nothing that was added after it. No error anywhere. If the file has been in the library for several minutes before the playlist is built, everything stays. Adding it to the library and waiting 45 s is not enough. Meanwhile the track's cloud status stays unknown, and GET /v1/me/library/search?types=library-songs does not list it (checked for 10 minutes). Emptying the playlist and building it again ~30 s after the entries were removed keeps everything, every time. That is what we do today; it costs 30–40 s per import, and we have to tell the user that entries were removed and put back. Our reading: while the freshly added file is not yet registered in iCloud Music Library, the playlist as pushed to the server is cut at the first item the server cannot reference, and the next sync adopts the shorter list for cloud items while keeping the local-only item in place. Questions Is there a supported way for a macOS app to create a library playlist and add tracks to it? Specifically: is the Apple Music API (POST /v1/me/library/playlists with relationships.tracks, and POST /v1/me/library/playlists/{id}/tracks) the intended route from a macOS app holding a MusicKit user token, and can such a playlist reference the user's own uploaded songs by their library id (i.…)? After a local file has been added to the library (via Music.app's add, or any other supported way), how can an app learn that iCloud Music Library has registered it, and what its library song id is? A notification, a MusicKit property, an Apple Music API endpoint? We would wait on that signal instead of rebuilding. Is the removal described above expected behaviour? Catalog ids are re-resolved at import time via id, ISRC and search as recommended in thread 122110, so stale catalog ids are not the cause. Reproduction Needs Sync Library on, at least 14 subscription tracks in the library, and a local audio file the library does not know yet. Prints the counts after 1 s, 21 s and 41 s, then cleans up. on run argv set localFile to POSIX file (item 1 of argv) tell application "Music" set cloudTracks to (every track of library playlist 1 whose cloud status is subscription) set idsBefore to persistent ID of every track of library playlist 1 set pl to make new user playlist with properties {name:"Reconciliation repro"} repeat with i from 1 to 2 duplicate (item i of cloudTracks) to pl end repeat set fileTrack to add localFile to pl set fileID to persistent ID of fileTrack repeat with i from 3 to 14 duplicate (item i of cloudTracks) to pl end repeat set n0 to count of tracks of pl delay 1 set n1 to count of tracks of pl delay 20 set n2 to count of tracks of pl delay 20 set n3 to count of tracks of pl delete pl if fileID is not in idsBefore then delete (first track of library playlist 1 whose persistent ID is fileID) return "after build: " & n0 & ", after 1 s: " & n1 & ", after 21 s: " & n2 & ", after 41 s: " & n3 end tell end run Output here: after build: 15, after 1 s: 15, after 21 s: 3, after 41 s: 3.
Replies
0
Boosts
0
Views
416
Activity
Sep ’26
MusicKit on HarmonyOS — playback approach for a platform without an official SDK, licensing question
Hello Apple Developer community, I'm building an Apple Music client for HarmonyOS (Huawei's operating system) and would like to clarify the licensing and technical approach before submitting to a third-party app store (Huawei AppGallery). I've read the Apple Developer Program License Agreement and App Store Review Guideline 4.5.2, but there are platform-specific constraints I'd like to discuss. Background Apple currently does not provide a MusicKit SDK for HarmonyOS. The available options are: MusicKit for iOS/macOS — not applicable (different OS) MusicKit for Android — ships as proprietary .aar binaries that cannot be redistributed and are not compatible with HarmonyOS's runtime MusicKit JS — available, but HarmonyOS WebView does not support FairPlay or Widevine EME, so full-song DRM playback through MusicKit JS does not work on this platform The only Apple Music API access path available to a HarmonyOS app is the REST API (api.music.apple.com) with a Developer Token (JWT, ES256) and a Music User Token obtained through the MusicKit JS authorization flow running inside a WebView. The technical constraint To deliver full-song playback for subscribed Apple Music users on HarmonyOS, our app retrieves the HLS playback URL via the Apple Music API, downloads the encrypted media segments, and decrypts them using HarmonyOS's native DRM system (WisePlay, the only CDM available on the platform). MusicKit JS's FairPlay/Widevine CDM is not compatible with HarmonyOS — WisePlay is the sole DRM implementation the OS exposes. We are aware that Section 4.5.2 states: "You may not, and You may not permit Your end users to, download, upload, or modify any MusicKit Content" and "You may play MusicKit Content only as rendered by the MusicKit APIs or MusicKit JS" What we want to clarify Our playback implementation works as follows, and we want to confirm whether it is acceptable under the license terms: No download service is offered to users. The download is purely an internal playback mechanism — the app fetches encrypted segments, decrypts them in memory / a protected sandbox, and plays them via the system AVPlayer. There is no "download button," no offline library, no user-facing download feature. Decrypted files are ephemeral and protected. Decrypted media is written to the app's private sandbox (not accessible to users or other apps), played immediately, and deleted as soon as playback ends or the song is skipped. The decrypted file never persists beyond the current playback session. No file leakage. The decrypted content is never exposed via any sharing mechanism, file picker, or external storage. It exists only within the app's protected data directory for the duration of playback. Standard playback controls are preserved. Users initiate playback and can use play / pause / skip / seek — the same controls required by 4.5.2(i). No monetization of Apple Music access. The app does not charge for Apple Music playback, does not show ads around it, and does not collect or share user data. Our question Given that: Apple has no SDK presence on HarmonyOS, MusicKit JS DRM is technically non-functional on HarmonyOS WebView, the only way to deliver full-song playback to Apple Music subscribers on this platform is to decrypt the stream using the OS's native DRM (WisePlay) with strict ephemeral handling, is this playback approach acceptable under the Apple Developer Program License Agreement, provided that: decrypted content is never persisted, shared, or exposed to users, the app only serves subscribed Apple Music users with valid Music User Tokens, all usage remains within the scope of facilitating access to the user's own Apple Music subscription? We fully respect Apple's content protection requirements and are happy to adjust the implementation (e.g., stricter deletion timing, additional sandboxing, attestation) to comply. We just want to understand whether the fundamental approach — decrypting via the host OS's DRM because Apple's own CDMs are unavailable on this platform — is permissible, or whether Apple considers HarmonyOS out of scope for full-song playback entirely. Any guidance from the MusicKit team or community members who have dealt with non-Apple-platform constraints would be greatly appreciated. Thank you.
Replies
0
Boosts
0
Views
455
Activity
Sep ’26
Apple Music real-time DJ mixing: is there an API or entitlement beyond MusicKit?
Hello, I am developing an iOS app that uses MusicKit and ApplicationMusicPlayer to create automatic transitions between songs from Apple Music. The app already analyzes tracks using BPM, musical key and danceability, orders them for compatible transitions, and uses MusicPlayer.Transition.crossfade for playback. With the public MusicKit APIs, however, I have reached a limitation. ApplicationMusicPlayer manages the playback queue and crossfade internally. I cannot independently control the outgoing and incoming Apple Music tracks as two decks, which would be required for DJ-style transitions (for example, starting the incoming track while independently controlling the outgoing track, choosing precise mix points, and managing the two playback positions during the overlap). I experimented with MusicPlayer.Queue.Entry startTime and endTime, but changing the end point is not equivalent to having independent deck control and can result in the current track ending before the desired transition. I understand that Apple Music content is protected and that direct access to decoded audio samples may intentionally not be available through the public MusicKit APIs. I am not looking to download, extract, record, or export Apple Music audio. My use case is real-time playback only, for authenticated Apple Music subscribers. My questions are: Is there a public API that allows two Apple Music tracks to be independently controlled and mixed in real time? If not, is there a restricted entitlement, API, or developer program available for DJ/mixing applications? If this capability requires a commercial or technical partnership with Apple Music rather than a public API, is there an official channel through which a developer can request or discuss such access? I am aware that some third-party DJ applications provide real-time mixing with Apple Music, so I would like to understand whether there is an officially supported integration path for other developers, rather than trying to work around the limitations of ApplicationMusicPlayer. Thank you.
Replies
0
Boosts
1
Views
749
Activity
Aug ’26
Apple Music / MusicKit Commercial Integration Enquiry – Multiplayer Music Game
Hello, Could this please be forwarded to the team responsible for Apple Music / MusicKit commercial integrations, developer partnerships and licensing? I am currently assessing the feasibility of developing a commercial browser-based multiplayer music game and would like to understand whether Apple Music and MusicKit could support the proposed use case. At a high level, players would privately select tracks from the Apple Music catalogue within the game. Once selections are complete, the application would arrange the selected tracks for sequential playback through a shared host account/device. Players would then interact with those tracks through the game. The application would provide the game functionality and would not download, store or independently redistribute full music recordings. Before progressing with development, I would appreciate clarification on the following: Commercial game use: Is integration of the Apple Music catalogue and MusicKit playback functionality into a commercial multiplayer game permitted? If specific approval, licensing or a commercial agreement with Apple is required, what is the appropriate process? Monetisation: Can the game itself be monetised through subscriptions, one-off purchases/party passes or advertising, provided users are paying for the game functionality rather than access to Apple Music or its catalogue? Apple Music subscription requirements: Would the account providing full-track playback need an active Apple Music subscription? If so, would only the host/playback account require a subscription, while other participants could join the game, search/select tracks and vote without having an Apple Music subscription themselves? Commercial playback alternative: If an Apple Music subscription is required for full-track playback, does Apple offer any commercial, licensing or partnership arrangement whereby the game operator could fund the necessary playback rights directly, rather than requiring the host to hold an individual Apple Music subscription? Catalogue access: Can players search the Apple Music catalogue and select tracks from within the application without every participant individually authenticating with Apple Music or holding an Apple Music subscription? Track availability: Can MusicKit/API functionality confirm whether a selected track is available for playback in the host's storefront/territory before accepting the selection? Playback control: Can the application create and manage a temporary playback queue containing the selected tracks and initiate sequential playback through an authorised host account/device without requiring the host to manually locate and play each track in the Apple Music application? Audio previews: Are short audio previews available through Apple Music/MusicKit, and may these be used within a commercial multiplayer game to help users identify a track before selecting it? If so, are there restrictions on preview duration or monetised use? Multi-provider support: Would Apple's terms permit Apple Music to be offered as one of several supported music playback providers within the same application, allowing a host to choose Apple Music or another supported streaming service? Additional licensing: If full recordings continue to be delivered and played through Apple Music/MusicKit, would the game developer require any additional master recording, publishing, public-performance or other music licences directly from rights-holders or collecting societies? Web/browser implementation: As the initial product is intended to be browser-based rather than a native iOS application, can the above catalogue, authentication and playback functionality be implemented through MusicKit on the Web? Are there any material differences in commercial permissions or capabilities compared with a native MusicKit implementation? Scaling: Are there different MusicKit/API access, approval, rate-limit or commercial requirements if the application progresses from development/testing to a publicly available commercial product with a significant user base? At this stage I am primarily trying to establish whether a compliant technical and commercial model exists before investing in development. If this enquiry would be better directed to an Apple Music partnership, MusicKit, licensing or business-development team, I would appreciate being pointed towards the appropriate contact. I would be happy to provide further technical details about the proposed integration if required. Kind regards, Errol Brinkman
Replies
0
Boosts
0
Views
500
Activity
Aug ’26