Apple Music API

Where/how/when/if do we get access to Apple Music API in our iOS applications (library search and streaming content)?

Accepted Reply

MusicKit is a framework from Apple that allows integtration with Apple Music :


https://developer.apple.com/musickit/


You will need a JWT (JSON Web Token) for authentication (not provided by Apple).

Replies

This is kind of important for me as well. I've been working on a way to make music more fun with friends as a side project. I'm going to use spotify and rdio's Apis. I would like to use Apple music. Having subscribed to all three, I have stuck with the latter. Right now they require that users have a subscription and developers register the application. Beats music had an api, but this seems to have been abandoned. There are a lot of cool things users could do with our apps and music that could benefit both parties. Spotify requires that an app cannot charge for its music and cannot advertise (obviously). This makes sense. When we use these APIs, we want to build something on top of it. I could understand not providing extensive access to connect. Apple music shines here. It would be really easy for competitors to just incorporate connect in their apps. However, I feel that a streaming api and way to save music to a user's library is essential.

FWIW, when subscribers add songs from Apple Music to their My Music library, those songs appear as MPItems like any other song., locally searchable and playable. Definitely echo the request to search the Apple Music catalog and stream songs on the subscribers behalf.

It seems that songs downloaded for offline use show up in a MPMediaQuery, but their MPMediaItemPropertyAssetURL is nil meaning you can't play them using AVPlayer.

What about for MediaPlayer? Would it be any different than using AVPlayer? I can get the information of songs that I haven't downloaded to my phone, but no artwork...Very frustrating as my player looks totally awesome when there IS an image to show, but when I'm playing an Apple radio station or playlist I will not get most of the images(again, only images I have stored show up).

MusicKit is a framework from Apple that allows integtration with Apple Music :


https://developer.apple.com/musickit/


You will need a JWT (JSON Web Token) for authentication (not provided by Apple).