Breaking News
Home / iOS / iOS Isuses / MPVolumeView linker error iPhone when compiling the project.

MPVolumeView linker error iPhone when compiling the project.

Issue

I am using MPVolumeView, get the linker Error, fails to compile.

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

Which framework should be linked with the project?<

Answer

Add the MediaPlayer framework to your project and #import <MediaPlayer/MediaPlayer.h> where ever you are using the MPVolumeView.[pb_builder]

Check Also

local variable ‘build_data’ referenced before assignment : TestFlight Error : Failed to upload build.

Scenario Trying to upload build to TestFlight fails in the end. Error local variable ‘build_data’ …

Advertisment ad adsense adlogger