Is it possible to play a song with iTunes API

529 views Asked by At

I have to make an iOS app about music. I have to show all data about singers. I also want to play music in my app.

Is it possible to play a song with iTunes API in my app or I have to redirect users into iOS music app?

1

There are 1 answers

0
isopach On

Yes it is possible, using the Media Player Framework, which is a part of Musickit (Apple Music API). To play content from the user's library, use one of the built-in MPMusicPlayerController objects.

Here's an excerpt from the page:

If your app incorporates music, you can use this framework to search for audio content (songs, podcasts, books, and so on) in the user's library. You can then play that content directly or ask the system Music app to play it.