MPMusicPlayerController not recommended with iOS 6

I just saw iOS 5.1 for iOS 6.0 API Differences released by Apple. They say that some important methods MPMusicPlayerController.hare deleted in the protocol MPMediaPlayback(play, pause, stop ...).

Does anyone know how to update my application that uses the code below to work with iOS 6?

MPMusicPlayerController *musicPlayer = [MPMusicPlayerController iPodMusicPlayer];
musicPlayer play;
+5
source share
1 answer

The class MPMusicPlayerControllerconforms to the protocol MPMediaPlayback, and the call [MPMusicPlayerController iPodMusicPlayer]returns an instance MPMusicPlayerController. Moreover, all obsolete methods that have been removed from the class MPMusicPlayerControllerare present in the protocol MPMediaPlayback. It means that:

  • , iOS 6. play MPMusicPlayerController, , .

  • . , -, , API , , MPMediaPlayback.

+10

All Articles