2

I am able to fetch recently played songs from Apple Music using MPMediaQuery and MPMediaItem.

But this is giving me songs list which are locally downloaded in my music app.

I'm not able to fetch songs those which are not downloaded and those I am playing from Apple Music. Is there any way to do so?

I did a lot R&D for this today and found:
https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/AppleMusicWebServicesReference/GetRecentlyPlayed.html#//apple_ref/doc/uid/TP40017625-CH62-SW1

Followed almost every step but stuck on JWT token generation. Also after generating JWT token what's next? I am not getting any link or something which could help me to do this step by step. Also having one more question, whether this API calling help me out to fetch recently played songs which are not downloaded and just played online in Apple music app?

If anyone could help me to achieve this please! Thanks in advance.

mert dökümcü
  • 761
  • 3
  • 9
  • 31
iGatiTech
  • 2,306
  • 1
  • 21
  • 45
  • I think the next step would be for you to actually write a network call to the api and pass the token in as a header. After that you would need to map the json response and actually start consuming the data in your application. There are tons of tutorials on this topic but generating a token is just a small step. – andromedainiative Dec 27 '17 at 13:43
  • @andromedainiative if you feel so generating a token is just a small step. Kindly provide working code example or any link if you can. – iGatiTech Dec 27 '17 at 13:52
  • @Gati: Have you listed apple songs ?If, please share. – Vineesh TP Mar 20 '18 at 06:54
  • @VineeshTP I have listed apple songs which are available offline in the device using MPMediaQuery and MPMediaItem, but not the ones which directly played from Apple Music. – iGatiTech Mar 20 '18 at 10:19

0 Answers0