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
3
votes
2 answers

Creating Apple Music developer token

I'm trying to create a JWT with JWT.io for Apple Music api (ObjC) and for some reason it's not generating a token when I follow the format Apple says to do in documentation using (ES256). Does anyone know how to set up Apple Music api tokens for…
3
votes
2 answers

Lookup song by ISRC in Apple Music/iTunes

I'm developing an iOS application which retrieves a song ISRC from an external source. I then need to use Apple's MusicKit SDK to get the song in Apple Music/iTunes, using the ISRC. Is it possible to do this? The Song resource type has the ISRC in…
Tom Oakley
  • 6,065
  • 11
  • 44
  • 73
3
votes
1 answer

Apple music User Token

I am trying to get user token with requestUserToken method.I have also generated Developer token but it will return error like (SKErrorDomain error 7.) Please anyone help me
Ankit Prajapati
  • 129
  • 1
  • 11
3
votes
1 answer

apple musickit user token

how to create music user token for Apple musikkit API's. Each time execute SKCloudServiceController().requestPersonalizationToken(forClientToken: developerTokenString) { (userToken, error) in if let token = userToken { // } else { …
3
votes
3 answers

Apple Music Kit - Play song with ID from user in storefront A for user with storefront B

If I am based in the US and I want to play the song "Sun" by Two Door Cinema Club I would use the ID 544390857. I can do this in (for example) the systemMusicPlayer and the song begins to play in Apple Music. If my friend is based in the UK and…
scgough
  • 5,099
  • 3
  • 30
  • 48
3
votes
1 answer

MPMusicPlayerController won't seek to given playbackTime

I want MPMusicPlayerController.applicationMusicPlayer() instance to start playing from a specific starting time: applicationMusicPlayer.setQueueWithStoreIDs([String(track.id)]) applicationMusicPlayer.currentPlaybackTime = 10.0 …
2
votes
0 answers

How can I fix 403 Forbidden Error When Using MusicKit?

I am trying to make a library GET request using MusicKit but I keep getting a 403 Forbidden Error. Here is the code I'm running in Python: import datetime import jwt secret = """ -----BEGIN PRIVATE KEY----- {Insert Private Key Here} -----END…
tlcs30
  • 21
  • 2
2
votes
1 answer

Apple Music API getting 403 'Forbidden' when trying to fetch recent tracks

Hey there people of the great world! I am attempting to retrieve all the recent tracks from the Apple Music API using the following HTTP request: static let AMRecentTracks = "https://api.music.apple.com/v1/me/recent/played/tracks" Shamefully I keep…
JeanDArc
  • 53
  • 4
2
votes
0 answers

Authorize to Apple Music via Facebook Messenger In-App Browser

We're using https://developer.apple.com/documentation/musickitjs to authorize Apple music, on Desktop it opens a new window to authorize to apple. But It's NOT working on mobile In-App Browser (both iOS & Android), probably because on mobile…
Ashish Chaturvedi
  • 1,352
  • 3
  • 13
  • 37
2
votes
4 answers

iOS 14 StoreKit - SKCloudServiceController's requestusertoken not being called properly

I am trying to play songs on iOS 14 using Apple Music API. I have the developer's token, and I have asked for the permission for accessing the user's apple music. However, when I call requestusertoken api, its closure never gets called, so obviously…
Celine
  • 31
  • 4
2
votes
1 answer

Export files from Music Library to Documents directory (Swift 5)

In my app I want to export files from Music Library and save them to Documents directory. I already fetch file list from Music Library and I get url of each file. But I still have two problems: I can export files only in "m4a" format, but I'd like…
2
votes
1 answer

Can I get a user's display name from Apple MusicKit?

I've been going through Apple's (awful) documentation for both MusicKit, the API and MusicKit JS, but I haven't been able to find an endpoint or method to retrieve a user's display name, email or any other information that I can use to identify the…
Niels Kersic
  • 830
  • 1
  • 9
  • 24
2
votes
0 answers

Make use of recently played songs endpoint on Apple Music

I would like to make use of the "Get Recently Played Resources" endpoint of the Apple Music API. More specifically, I would like to keep track of how often a user has listened to a specific song/album. As of right now, I am not quite convinced if…
linus_hologram
  • 1,595
  • 13
  • 38
2
votes
0 answers

applicationQueuePlayer establishConnectionIfNeeded timeout

Trying to play apple music with MPMusicPlayerController.applicationMusicPlayer it's showing error <[SDKPlayback] applicationQueuePlayer _establishConnectionIfNeeded timeout [ping did not pong]> on iOS 13.4 but same code run on iOS 13.3 working…
2
votes
2 answers

Creating A Developer Token For Apple Music API

I'm currently trying to create a Developer Token for the MusicKit API, I have the following: 10 digit Team-Id, 10 digit Key-Id, a .p8 AuthKey file. All of these are valid. I have tried using the following code to generate the token: JavaScript in…
barbecu
  • 684
  • 10
  • 28
1 2
3
11 12