Questions tagged [apple-musickit]

The MusicKit framework allows iOS apps to play a user's Apple Music & local music.

Introduced with iOS 11, MusicKit on iOS lets users play Apple Music and their local music library natively from third party apps and games. When a user provides permission to their Apple Music account, an iOS app can create playlists, add songs to their library, and play any of the millions of songs in the Apple Music catalog. If the app detects that the user is not yet an Apple Music member, you can offer a trial from within your app.

169 questions
1
vote
1 answer

Initialising MPMusicPlayerMediaItemQueueDescriptor

Within a function how do you initialise an MPMusicPlayerMediaItemQueueDescriptor, as the first step in the prepend method part of Music Kit? I think I need my media query to become a queue descriptor, and believe I need to initialise it, but not…
Jack Vanderpump
  • 216
  • 2
  • 16
1
vote
0 answers

Upload a track to Apple Music (API)

Is there a way to upload the track from my computer to Apple Music? Apple provided an API, but I only found the following request from it: POST https://api.music.apple.com/v1/me/library/playlists/{id}/tracks As I understand, this request can add…
1
vote
0 answers

How many chart positions are available in the Apple Music API?

Example call: https://api.music.apple.com/v1/catalog/us/charts?types=songs&genre=34 The help page (https://developer.apple.com/documentation/applemusicapi/get_catalog_charts) says the results are paginated and can retrieve 50 positions at a time.…
1
vote
0 answers

Apple Developer Token in Head Meta Tag MusicKit JS

In starting to work with MusicKit JS in a react app, I came across this method for loading the library (no NPM package available) in the documentation here: ...
Kim
  • 856
  • 1
  • 11
  • 21
1
vote
0 answers

How to access user music library on iOS 13

Since iOS 9.3 we can use the API SKCloudServiceController.requestAuthorization to ask permission to access the user's music library. The documentation says that the only change to this API on Xcode 11 was the support for tvOS, which should not…
Marcos Tanaka
  • 3,112
  • 3
  • 25
  • 41
1
vote
0 answers

Unhandled Promise Rejection: PLAY_ACTIVITY -- Apple MusicKitJS API

Im trying to build a simple apple music web app player. I successfully got a little example working. I'm able to load an album, song, etc to a the music player queue based off of the 'type' and 'id'. Im able to play, pause, skip to next track,…
wpresti
  • 11
  • 1
  • 1
1
vote
1 answer

How to play a song using MusicKit SDK for Android

I'm trying to play a song using MusicKit SDK for Android, but I can't figure out how to play a certain song by its ID. For instance I have this apple music song Id: "1440783625" (Smells Like Teen Spirit by Nirvana) and I want to play this song using…
123
  • 127
  • 3
  • 18
1
vote
1 answer

401 error when accessing MusicKit API via node.js

I'm trying to access the MusicKit API but it keeps returning a 401 unauthorized error. I can't figure this out. I have this code to generate a Developer Token: const privateKey = fs.readFileSync("resources/AuthKey.p8").toString(); const teamId =…
Tometoyou
  • 7,792
  • 12
  • 62
  • 108
1
vote
0 answers

MusicKitJs: unable to play songs from custom list

I am trying to play songs from my API in M4A format and iTunes link. I don't want the user to login to iTunes to play the song. Is it possible? Also when I am adding the song, either single or in queue, I am getting an error: musickit.js:1 Uncaught…
Rahul Gupta
  • 972
  • 11
  • 29
1
vote
0 answers

Error using SKCloudServiceController API to check Apple Music capabilities

I am using this code to try to check a devices Apple Music capabilities: SKCloudServiceController *controller = [SKCloudServiceController new]; [controller requestCapabilitiesWithCompletionHandler:^(SKCloudServiceCapability capabilities, NSError…
KiloOne
  • 312
  • 1
  • 6
  • 20
1
vote
1 answer

Removing a playlist from iOS MPMediaLibrary

MPMediaLibrary contains the api for creating a new playlist: https://developer.apple.com/documentation/mediaplayer/mpmedialibrary func getPlaylist(with uuid: UUID, creationMetadata: MPMediaPlaylistCreationMetadata?, completionHandler: @escaping…
Jonathan
  • 614
  • 1
  • 9
  • 18
1
vote
1 answer

Album artwork from track MPMediaItem

I'm using Apple Music API's recent played endpoint which returns a list of recently played media assets. I'm then using one of them and play it on MPMusicPlayerController. { "id": "1437591818", "type": "albums", "href":…
jcardenete
  • 1,646
  • 3
  • 13
  • 16
1
vote
0 answers

Query a song based on album name, artist name and song number?

I'm a newbie to the MusicKit API, and I'm building a music discovery app. If I have an album name, artist name and track number, does anyone know if it is possible to query Apple Music and get a song id back using that information? It seems like…
Rock4009
  • 11
  • 2
1
vote
0 answers

Apple Music Authorisation vs Media Library Authorisation

In order to access the User's Apple Music Library, I need to request authorisation from SKCloudServiceController.authorizationStatus() Also, there is another authorisation option in MPMediaLibrary. I need to be able to access both user's library…
Sudara
  • 4,769
  • 3
  • 34
  • 39
1
vote
0 answers

Impossible to retrieve playlist tracklist Apple Music API

Since 2am UTC today , there's an error message returned when getting an Apple Music tracklist: {"errors":[{"id":"XXXXXX","title":"Missing Parameter","detail":"No mode supplied on the…
blackarcanis
  • 542
  • 1
  • 4
  • 23