Getting started: MPMusicPlayerController
You need to addMediaPlayer.framework
to your target in Xcode and #import <MediaPlayer/MediaPlayer.h>
. To control music playback, we use an instance of MPMusicPlayerController
. There are two types of music players. The iPodMusicPlayer
is a reference to the music player instance used by the iPod app. Any
settings you change, such as the shuffle or repeat modes, will be
changed in the iPod app, too. If the iPod is playing when your
application starts, the music will continue playing and you can access
the current song and skip back and forward through the currently active
playlist. When your app quits, the music will continue playing. I
imagine this mode is very handy for most utility apps that try to
improve your music listening experience by interacting with the iPod..