3

I am trying to make a slider to control device volume. Previously I have accomplished this with MPVolumeView, but since iOS 5 I get the following error on build:

Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_MPVolumeView", referenced from:
  objc-class-ref in PlayerViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Can someone please tell me what is the problem or is there another way to control devices volume.

Thanks in advance!

reggian
  • 627
  • 7
  • 21

1 Answers1

7

You need to make sure that you link against the MediaPlayer.framework

hypercrypt
  • 15,389
  • 6
  • 48
  • 59
  • If that means including #import in my .h file, than it does not help. – reggian Oct 17 '11 at 00:30
  • 1
    You also need to include it during the 'Link Binary With Libraries' Build Phase. If you go to the project inspector, select the target, go to Build Phases and make sure `MediaPlayer.framework` is in the 'Link Binary With Libraries' list. – hypercrypt Oct 17 '11 at 00:48