1

I have a project using phonegap 3.1 which was working fine.

I added the cordova file plugin like so:

cordova plugin add org.apache.cordova.file

then

phonegap build ios

which runs fine.

I open the project in xcode and it fails to compile with the error:

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

It's quite meaningless so I poke around further and fine that CDVFile.h and CDVFile.m are highlighted in Red inside my plugins directory in my xcode project and clicking on them won't show their code. My other plugins are working fine.

I tried product -> clean but it didn't help.

Anybody know what else I can try?

Jamesla
  • 1,378
  • 7
  • 31
  • 62

1 Answers1

1

I believe you need to run phonegap local plugin add org.apache.cordova.file if you want the plugins available locally.

Devgeeks
  • 5,659
  • 4
  • 28
  • 35
  • Thanks I thought that had worked but actually it does the same thing. When i browse my project the folder with the file plugin is missing. – Jamesla Nov 13 '13 at 01:44
  • Make sure after adding a plugin to run `phonegap local build iOS` to make sure allplugins have been added to the platform – Devgeeks Nov 13 '13 at 03:07
  • Ok I ended up making a new project and then using phonegap local plugin add and it worked ok, i think using cordova plugin add then remove broke it. So all fixed now, thanks for your help :) – Jamesla Nov 14 '13 at 00:15
  • There is a significant difference between cordova and phonegap commands in the command line. When you call cordova it means the same as phonegap local, so when you call phonegap it doesn't mean that the command is executed locally. Also take a look at this [question](http://stackoverflow.com/questions/18174511/is-there-a-difference-between-phonegap-and-cordova-commands). – Dibran Mar 26 '14 at 10:38