Phonegap/Cordova ‘n iOS throws its linker command guts at you:

Reading Time: 1

XCode 4 is outWhen working with Cordova/Phonegap updating your platform project sometimes makes it necessary to deïnstall and install your plugins again so they match the latest versions and the native project structure setup. Been there, done that.

But what about those beautiful errors, like the following:

Undefined symbols for architecture i386:

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

I fixed those before, a while ago but ye olde trick that I mentioned at first didn’t cut it this time. Appears that the key is not the distracting architecture i386 bit, but the word linker It is just missing the .m files (in this case the ones in the plugin directory).

So, to fix this one, follow these steps:

  1. Open the project in XCode
  2. Navigate to your Project > Targets settings
  3. Go to Build Phases > Compile Sources
  4. add all *.m files under plugins directory
  5. (re)build and enjoy.

Credits go to Kocik for giving this SO answer that made it all clear once more..