Ios – Phonegap local builds fail with media plugin

cordovaios

  1. create new project
  2. build for iOS: SUCCESS
  3. add media plugin
  4. build for iOS: FAIL

The following build commands failed:
CompileC build/HelloWorld.build/Debug-iphonesimulator/HelloWorld.build/Objects-normal/i386/CDVSound.o HelloWorld/Plugins/org.apache.cordova.media/CDVSound.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
[error] /Projects/Code/hello/platforms/ios/cordova/build: Command failed with exit code 65

Here's the list of commands

phonegap create hello
cd hello
phonegap build ios   # WORKS
phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-media.git
phonegap build ios   # FAILS

Same scenario happens with cordova, and if I use sudo.

Best Answer

I fixed the problem by completely deleting the iOS folder under platforms, then re-running phonegap build ios.

Related Topic