MusicKit

RSS for tag

Let users play Apple Music and their local music library from your app using MusicKit.

Posts under MusicKit 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
23h
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
234
1d
Feature request: level metering for MusicKit playback (FB25234486)
Hi everyone, I'm building a tvOS app that shows analog VU meters for the music playing, in the style of vintage hi-fi amplifiers and tape decks. It works well with local and network files played through AVAudioEngine, where I can tap the signal and measure real levels. With Apple Music, though, there's no way to get even basic level information. The content is DRM-protected, SystemMusicPlayer and ApplicationMusicPlayer render audio outside the app's audio graph, and MusicKit has no metering API. My current workaround is to analyze the song's 30-second preview and replay its level envelope in a loop. It looks plausible, but it isn't in sync with the actual music. I filed FB25234486 asking for a read-only metering API on MusicPlayer, similar to what AVAudioPlayer already offers: let rms = musicPlayer.averagePower(forChannel: 0) // dBFS let peak = musicPlayer.peakPower(forChannel: 0) // dBFS This wouldn't expose any audio samples: just one RMS and one peak value per channel, at a low, capped rate (around 30 Hz). Those numbers can't be turned back into audio, so content protection wouldn't be weakened, and the values could be computed inside the system's playback process. It would make a number of use cases possible: VU and peak meters, audio-reactive visualizers, ambient lighting synced to the music (HomeKit, smart lights), loudness displays, and accessibility features such as visual feedback of the music for hard-of-hearing users. If you need this too, please file your own feedback and mention FB25234486. Duplicate reports help Apple gauge demand. And if anyone has found a supported way to get playback levels from MusicKit today, I'd love to hear about it. Thanks!
0
0
35
2d
Is there a supported API to open a computer-synced album’s Library page in Music on iOS?
I’m building a personal iPhone app that organizes my music library. When I tap an album in my app, I want Apple’s Music app to open directly to that album’s page in Library, showing the tracks synced from my computer. My app can already read the albums and their tracks using MusicKit. I’ve tried normal Apple Music sharing links, but those open the catalog version of the album. I need the page I see when I find the album through Library in the Music app. Starting or changing playback is fine, but the album page must appear. Only starting the music or opening Now Playing would not be enough. Is there a supported API or link format that can do this? A documentation link or a small code example would be helpful.
0
0
39
3d
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
260
3d
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
278
3d
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
371
3d
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
666
1w
Is using MusicKit for a non-commercial music intro quiz permitted under Apple’s terms?
Hello, I am developing a non-commercial, web-based music intro quiz using MusicKit on the Web and Apple Music. Before proceeding with development and potentially making the application publicly available, I would like to clarify whether the following implementation complies with Apple’s MusicKit and Apple Music terms. Planned implementation: Each participant authenticates with their own Apple Music account and must have an active subscription. Music is streamed directly from Apple Music to each participant’s device through MusicKit. My server only sends Apple Music song IDs and playback control messages. No audio files are downloaded, stored, modified, redistributed, or transmitted through my server. When the host starts a question, the application triggers playback on each participant’s device. Playback automatically stops after approximately five seconds, allowing participants to guess the song. The application is initially intended for private, non-commercial use with approximately 5–10 participants. I may eventually make it publicly available for online multiplayer sessions. My questions are: Is it permitted for a host to remotely trigger MusicKit playback on other participants’ devices, provided each participant has authenticated with their own Apple Music account? Does automatically stopping playback after approximately five seconds violate any MusicKit playback requirements? Is using Apple Music playback as part of a music identification quiz or game permitted? Would sending song IDs and playback commands to multiple devices be considered prohibited synchronization of Apple Music content, even though each device streams the audio independently? If this implementation is not permitted, would requiring each participant to manually initiate playback make the application compliant, assuming all other requirements are satisfied? Are there any additional licensing requirements or permissions necessary before making this type of application publicly available? I understand that MusicKit has requirements concerning user-initiated playback, standard playback controls, and synchronization with other content. I would particularly appreciate clarification on how these requirements apply to this use case. If this forum is not the appropriate place for questions about MusicKit licensing and permitted use, could someone please direct me to the appropriate Apple team or contact point? Thank you for your time and guidance.
0
0
87
1w
Supported Music User Token flow for a Windows desktop app using MusicKit on the Web
Hello, I am building a Windows desktop application that lets users migrate their own playlists between music services. Apple currently documents automatic Music User Token management for Apple platforms and web apps, and manual token management for Android. I could not find a documented native Windows authorization flow. My proposed architecture is: Windows desktop app → system browser → MusicKit on the Web authorization → return authorization to the same Windows desktop app. The desktop app would then call Apple Music API directly using a developer token issued by my backend and the user authorization obtained through MusicKit. My questions are: Is there a supported way for a Windows desktop app to obtain a Music User Token through MusicKit on the Web and then use that token from the desktop process? Is handing the token back from the browser to the same Windows device supported? If yes, is there a recommended handoff mechanism or lifecycle/refresh guidance? Is secure local storage of that Music User Token on Windows supported? I am not asking about playback. The intended usage is only reading the user’s playlists and creating playlists through Apple Music API. The Media Services private key would remain server-side and would never be shipped with the desktop application. Thank you.
0
0
61
1w
Supported MusicKit APIs for vinyl-style speed, pitch and reverse playback of subscription songs on iOS?
I am building a personal iPhone prototype with an on-screen record platter. Before enrolling in the Apple Developer Program or developing the Apple Music integration further, I would like to establish whether the core interaction is supported by public APIs. The intended interaction is: Tap the platter to play or pause an Apple Music subscription song. Hold the platter to stop playback at its current position. Move the platter forward or backward to control the direction and speed of audible playback continuously. Change pitch together with speed, like a physical record, rather than preserving the original pitch. Release the platter to smoothly return to normal playback. Hold a separate control to listen continuously at a faster speed. A prototype using an AVAudioEngine-based renderer works with unprotected local audio. I have NOT verified these behaviors with Apple Music subscription content. I understand that this local renderer does not establish feasibility for MusicKit, and I am not seeking to extract protected audio or bypass content protection. MusicPlayer.State.playbackRate is documented as settable, with positive values for forward playback and negative values for reverse playback: https://developer.apple.com/documentation/musickit/musicplayer/state-swift.class/playbackrate For ApplicationMusicPlayer on iOS, is this vinyl-style interaction supported for full Apple Music subscription songs, rather than previews or user-owned unprotected files? In particular: What playback-rate range is supported for subscription songs? Do negative rates produce audible reverse playback, and how should zero-speed holding be implemented? Is there a documented public API to make pitch follow playback speed, or to disable pitch preservation? Are frequent rate and direction changes supported for interactive scratching? Are there documented limitations on update frequency, buffering, seeking precision or responsiveness? If this interaction is outside public MusicKit capabilities, is there an official channel where an individual developer can ask about eligibility for an approved Apple Music DJ integration? I am asking for the supported API path and its limitations, not implementation details of another app. If only ordinary variable-speed playback or seeking is supported, a clear distinction from continuous vinyl-style scratching would be very helpful. The initial goal is personal use; possible App Store distribution is undecided. I have an active Apple Music subscription but am not currently enrolled in the paid Apple Developer Program. Thank you.
1
0
378
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
456
2w
iOS 27: CPNowPlayingTemplate does not follow the active Now Playing client between an app's own client and its ApplicationMusicPlayer client (FB24840951)
On iOS 27, an app of mine that plays both its own audio and Apple Music tracks has two Now Playing clients in MediaRemote, as any app using ApplicationMusicPlayer.shared does: its own process's MPNowPlayingInfoCenter.default(), and MusicKit's player hosted out of process by com.apple.MediaPlayer.RemotePlayerService. MediaRemote elects between them correctly - the client whose process is making sound becomes active - and both the Lock Screen and the CarPlay dashboard follow the change. My CPNowPlayingTemplate does not. It stays on whichever client it was on when the change happened, so during an Apple Music track the car shows my own (now stale) entry with the clock frozen and a play glyph while music is audible; in some sessions the reverse, where my own audio after a track gets a blank template whose play presses are delivered to MusicKit's empty player and interrupt playback. From mediaremoted on iOS 27, handlePlaybackQueueRequest from CarPlayTemplateUIHost returns for (pid) > default throughout a track, and no contentItemChange for the RemotePlayerService path is ever posted to CarPlayTemplateUIHost, though it is posted to springboard, CarPlayApp and MediaRemoteUI. On iOS 26.6.1 with the same build, the same template host reads and commands RemotePlayerService/ during the track and > default afterwards. So the routing of commands to the active client is not what changed - what the template reads and sends to is. Filed as FB24840951 with mediaremoted captures from both OS versions, full sysdiagnose archives and screen recordings of the car screen beside the Lock Screen. Two questions: Is there a supported way for an audio app to tell CPNowPlayingTemplate which of its Now Playing clients to display? MPNowPlayingSession looks like the intended mechanism but accepts only AVPlayer instances, so it cannot represent either an AVAudioEngine graph or MusicKit's player; tested with a dormant AVPlayer it reported isActive == true every time and moved the template on some tracks and not others. Does the new MiniPlayer affect this? WWDC26's "Rev up your CarPlay app" says the MiniPlayer is new in iOS 27 and appears automatically for every app that shows now playing. Since the template was reworked in the same release this regressed in, does CPNowPlayingTemplate.shared.allowsMiniPlayer = false change which client is read? I have not tested it yet and will report back either way. Meanwhile the only thing that moves the car is republishing my own entry once a second as a new content item, which the template does re-read, so the clock steps instead of freezing. That ships in PodMelody 1.1.4, a workaround for an OS bug rather than a fix - and it doesn't resolve the mismatched play/pause glyph. If you have an audio app using ApplicationMusicPlayer and CarPlay, I would be glad to know whether you see the same thing, and in which car - duplicates on the Feedback are what get these prioritised.
1
0
369
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
417
2w
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
387
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
734
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
440
3w
Apple Music data not syncing via MusicKit / Apple Music API
Hi, experiencing an issue with Apple Music syncing in our app. Apple Music data hasn’t been syncing for a while. We’ve investigated the issue on our side and haven’t found anything that could explain it, so we’d like to check whether there are any known issues or recent changes affecting Apple Music API data. Could someone from the Apple Music/MusicKit team help us investigate this? We can provide affected user examples, timestamps, API responses, and any other information needed.
0
0
90
4w
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
171
4w
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
23h
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
234
Activity
1d
Feature request: level metering for MusicKit playback (FB25234486)
Hi everyone, I'm building a tvOS app that shows analog VU meters for the music playing, in the style of vintage hi-fi amplifiers and tape decks. It works well with local and network files played through AVAudioEngine, where I can tap the signal and measure real levels. With Apple Music, though, there's no way to get even basic level information. The content is DRM-protected, SystemMusicPlayer and ApplicationMusicPlayer render audio outside the app's audio graph, and MusicKit has no metering API. My current workaround is to analyze the song's 30-second preview and replay its level envelope in a loop. It looks plausible, but it isn't in sync with the actual music. I filed FB25234486 asking for a read-only metering API on MusicPlayer, similar to what AVAudioPlayer already offers: let rms = musicPlayer.averagePower(forChannel: 0) // dBFS let peak = musicPlayer.peakPower(forChannel: 0) // dBFS This wouldn't expose any audio samples: just one RMS and one peak value per channel, at a low, capped rate (around 30 Hz). Those numbers can't be turned back into audio, so content protection wouldn't be weakened, and the values could be computed inside the system's playback process. It would make a number of use cases possible: VU and peak meters, audio-reactive visualizers, ambient lighting synced to the music (HomeKit, smart lights), loudness displays, and accessibility features such as visual feedback of the music for hard-of-hearing users. If you need this too, please file your own feedback and mention FB25234486. Duplicate reports help Apple gauge demand. And if anyone has found a supported way to get playback levels from MusicKit today, I'd love to hear about it. Thanks!
Replies
0
Boosts
0
Views
35
Activity
2d
Is there a supported API to open a computer-synced album’s Library page in Music on iOS?
I’m building a personal iPhone app that organizes my music library. When I tap an album in my app, I want Apple’s Music app to open directly to that album’s page in Library, showing the tracks synced from my computer. My app can already read the albums and their tracks using MusicKit. I’ve tried normal Apple Music sharing links, but those open the catalog version of the album. I need the page I see when I find the album through Library in the Music app. Starting or changing playback is fine, but the album page must appear. Only starting the music or opening Now Playing would not be enough. Is there a supported API or link format that can do this? A documentation link or a small code example would be helpful.
Replies
0
Boosts
0
Views
39
Activity
3d
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
260
Activity
3d
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
278
Activity
3d
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
371
Activity
3d
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
666
Activity
1w
Is using MusicKit for a non-commercial music intro quiz permitted under Apple’s terms?
Hello, I am developing a non-commercial, web-based music intro quiz using MusicKit on the Web and Apple Music. Before proceeding with development and potentially making the application publicly available, I would like to clarify whether the following implementation complies with Apple’s MusicKit and Apple Music terms. Planned implementation: Each participant authenticates with their own Apple Music account and must have an active subscription. Music is streamed directly from Apple Music to each participant’s device through MusicKit. My server only sends Apple Music song IDs and playback control messages. No audio files are downloaded, stored, modified, redistributed, or transmitted through my server. When the host starts a question, the application triggers playback on each participant’s device. Playback automatically stops after approximately five seconds, allowing participants to guess the song. The application is initially intended for private, non-commercial use with approximately 5–10 participants. I may eventually make it publicly available for online multiplayer sessions. My questions are: Is it permitted for a host to remotely trigger MusicKit playback on other participants’ devices, provided each participant has authenticated with their own Apple Music account? Does automatically stopping playback after approximately five seconds violate any MusicKit playback requirements? Is using Apple Music playback as part of a music identification quiz or game permitted? Would sending song IDs and playback commands to multiple devices be considered prohibited synchronization of Apple Music content, even though each device streams the audio independently? If this implementation is not permitted, would requiring each participant to manually initiate playback make the application compliant, assuming all other requirements are satisfied? Are there any additional licensing requirements or permissions necessary before making this type of application publicly available? I understand that MusicKit has requirements concerning user-initiated playback, standard playback controls, and synchronization with other content. I would particularly appreciate clarification on how these requirements apply to this use case. If this forum is not the appropriate place for questions about MusicKit licensing and permitted use, could someone please direct me to the appropriate Apple team or contact point? Thank you for your time and guidance.
Replies
0
Boosts
0
Views
87
Activity
1w
Supported Music User Token flow for a Windows desktop app using MusicKit on the Web
Hello, I am building a Windows desktop application that lets users migrate their own playlists between music services. Apple currently documents automatic Music User Token management for Apple platforms and web apps, and manual token management for Android. I could not find a documented native Windows authorization flow. My proposed architecture is: Windows desktop app → system browser → MusicKit on the Web authorization → return authorization to the same Windows desktop app. The desktop app would then call Apple Music API directly using a developer token issued by my backend and the user authorization obtained through MusicKit. My questions are: Is there a supported way for a Windows desktop app to obtain a Music User Token through MusicKit on the Web and then use that token from the desktop process? Is handing the token back from the browser to the same Windows device supported? If yes, is there a recommended handoff mechanism or lifecycle/refresh guidance? Is secure local storage of that Music User Token on Windows supported? I am not asking about playback. The intended usage is only reading the user’s playlists and creating playlists through Apple Music API. The Media Services private key would remain server-side and would never be shipped with the desktop application. Thank you.
Replies
0
Boosts
0
Views
61
Activity
1w
Supported MusicKit APIs for vinyl-style speed, pitch and reverse playback of subscription songs on iOS?
I am building a personal iPhone prototype with an on-screen record platter. Before enrolling in the Apple Developer Program or developing the Apple Music integration further, I would like to establish whether the core interaction is supported by public APIs. The intended interaction is: Tap the platter to play or pause an Apple Music subscription song. Hold the platter to stop playback at its current position. Move the platter forward or backward to control the direction and speed of audible playback continuously. Change pitch together with speed, like a physical record, rather than preserving the original pitch. Release the platter to smoothly return to normal playback. Hold a separate control to listen continuously at a faster speed. A prototype using an AVAudioEngine-based renderer works with unprotected local audio. I have NOT verified these behaviors with Apple Music subscription content. I understand that this local renderer does not establish feasibility for MusicKit, and I am not seeking to extract protected audio or bypass content protection. MusicPlayer.State.playbackRate is documented as settable, with positive values for forward playback and negative values for reverse playback: https://developer.apple.com/documentation/musickit/musicplayer/state-swift.class/playbackrate For ApplicationMusicPlayer on iOS, is this vinyl-style interaction supported for full Apple Music subscription songs, rather than previews or user-owned unprotected files? In particular: What playback-rate range is supported for subscription songs? Do negative rates produce audible reverse playback, and how should zero-speed holding be implemented? Is there a documented public API to make pitch follow playback speed, or to disable pitch preservation? Are frequent rate and direction changes supported for interactive scratching? Are there documented limitations on update frequency, buffering, seeking precision or responsiveness? If this interaction is outside public MusicKit capabilities, is there an official channel where an individual developer can ask about eligibility for an approved Apple Music DJ integration? I am asking for the supported API path and its limitations, not implementation details of another app. If only ordinary variable-speed playback or seeking is supported, a clear distinction from continuous vinyl-style scratching would be very helpful. The initial goal is personal use; possible App Store distribution is undecided. I have an active Apple Music subscription but am not currently enrolled in the paid Apple Developer Program. Thank you.
Replies
1
Boosts
0
Views
378
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
456
Activity
2w
iOS 27: CPNowPlayingTemplate does not follow the active Now Playing client between an app's own client and its ApplicationMusicPlayer client (FB24840951)
On iOS 27, an app of mine that plays both its own audio and Apple Music tracks has two Now Playing clients in MediaRemote, as any app using ApplicationMusicPlayer.shared does: its own process's MPNowPlayingInfoCenter.default(), and MusicKit's player hosted out of process by com.apple.MediaPlayer.RemotePlayerService. MediaRemote elects between them correctly - the client whose process is making sound becomes active - and both the Lock Screen and the CarPlay dashboard follow the change. My CPNowPlayingTemplate does not. It stays on whichever client it was on when the change happened, so during an Apple Music track the car shows my own (now stale) entry with the clock frozen and a play glyph while music is audible; in some sessions the reverse, where my own audio after a track gets a blank template whose play presses are delivered to MusicKit's empty player and interrupt playback. From mediaremoted on iOS 27, handlePlaybackQueueRequest from CarPlayTemplateUIHost returns for (pid) > default throughout a track, and no contentItemChange for the RemotePlayerService path is ever posted to CarPlayTemplateUIHost, though it is posted to springboard, CarPlayApp and MediaRemoteUI. On iOS 26.6.1 with the same build, the same template host reads and commands RemotePlayerService/ during the track and > default afterwards. So the routing of commands to the active client is not what changed - what the template reads and sends to is. Filed as FB24840951 with mediaremoted captures from both OS versions, full sysdiagnose archives and screen recordings of the car screen beside the Lock Screen. Two questions: Is there a supported way for an audio app to tell CPNowPlayingTemplate which of its Now Playing clients to display? MPNowPlayingSession looks like the intended mechanism but accepts only AVPlayer instances, so it cannot represent either an AVAudioEngine graph or MusicKit's player; tested with a dormant AVPlayer it reported isActive == true every time and moved the template on some tracks and not others. Does the new MiniPlayer affect this? WWDC26's "Rev up your CarPlay app" says the MiniPlayer is new in iOS 27 and appears automatically for every app that shows now playing. Since the template was reworked in the same release this regressed in, does CPNowPlayingTemplate.shared.allowsMiniPlayer = false change which client is read? I have not tested it yet and will report back either way. Meanwhile the only thing that moves the car is republishing my own entry once a second as a new content item, which the template does re-read, so the clock steps instead of freezing. That ships in PodMelody 1.1.4, a workaround for an OS bug rather than a fix - and it doesn't resolve the mismatched play/pause glyph. If you have an audio app using ApplicationMusicPlayer and CarPlay, I would be glad to know whether you see the same thing, and in which car - duplicates on the Feedback are what get these prioritised.
Replies
1
Boosts
0
Views
369
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
417
Activity
2w
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
387
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
734
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
440
Activity
3w
Apple Music data not syncing via MusicKit / Apple Music API
Hi, experiencing an issue with Apple Music syncing in our app. Apple Music data hasn’t been syncing for a while. We’ve investigated the issue on our side and haven’t found anything that could explain it, so we’d like to check whether there are any known issues or recent changes affecting Apple Music API data. Could someone from the Apple Music/MusicKit team help us investigate this? We can provide affected user examples, timestamps, API responses, and any other information needed.
Replies
0
Boosts
0
Views
90
Activity
4w
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
171
Activity
4w