MPMusicPlayerController and setNowPlayingItem

I use MPMusicPlayerController , specifically with the setNowPlayingItem protocol and for cydia . But I have some problems and a warning about when I do. It seems that some of the protocols and methods do not work, and I get a warning:

 Tweak.xm:177: warning: 'MPMusicPlayerController' may not respond to '-skipToPreviousItem' Tweak.xm:188: warning: 'MPMusicPlayerController' may not respond to '-pause' Tweak.xm:193: warning: 'MPMusicPlayerController' may not respond to '-play' Tweak.xm:201: warning: 'MPMusicPlayerController' may not respond to '-skipToNextItem' Tweak.xm:317: warning: 'MPMusicPlayerController' may not respond to '-setNowPlayingItem:' 

Does anyone have any ideas? I enter the protocol already in the prototype

+4
source share
2 answers

I don't think it's due to cydia - it sounds like a compilation issue.

You definitely got

 #import <MediaPlayer/MediaPlayer.h> 

in your file?

0
source

Have you added MediaPlayer.framework to your project?

  • select a project in the project navigator
  • Choose your target on the right.
  • select the "Phase Assembly" tab
  • open "Link Binary With Libraries"
  • add framework
0
source

All Articles