views:

67

answers:

1

Hey guys,

Can anyone give me a head starters on this question. How would I be able to make an app that searches through your music contents that are already synced on your phone and play them. I don't want to do a scroll view, where the user just presses on the options. Instead I want the user to type the song name and if the song is found it will play it.

thanks,

kevin

+2  A: 

The class you are looking for is MPMusicPlayerController. It's only available in iPhone 3.0 and above.

Get the instance for your app ([MPMusicPlayerController applicationMusicPlayer]) rather than the iPod instance. You can use this to play the songs once you've located them.

In order to do your own search rather than presenting the typical interface check out MPMediaQuery.

I found this article helpful. It's mostly about iPod player integration, but it touches on these other topics too.

Benjamin Cox