When 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:
- Open the project in XCode
- Navigate to your Project > Targets settings
- Go to Build Phases > Compile Sources
- add all *.m files under plugins directory
- (re)build and enjoy.
Credits go to Kocik for giving this SO answer that made it all clear once more..