clang: error: no such file or directory: \'/Users/admin/Library/Developer/Xcode/DerivedData/__TESTING__-fzbkvdbnndieeagphtjhdndiyttl/Build/Products/Debug-iphoneos/li
For your project, set the build setting "Build Active Architecture Only" to yes.
(Maybe also set the the Architectures build setting to "Standard (armv7, armv7s)" for CordovaLib project.)
Make sure that the CordovaLib's product's target is set to "Relative to Built Product" on the right hand-side panel, first tab on theleft, under "Identity and Type".
I had the same problem as you, worked fine deployed to the simulators but not to a device. Neither of the suggested answers worked for me.
Here's what did work for me:
Set deployment target to v4.3 and on the project settings for the CordovaLib
project, set the Build Active Architecture Only
to Yes
. (Not needed on your main project).
Important, do a Product-> Clean and rebuild.
Download the Cordova installer from here http://phonegap.com/download. Make sure it is the same version that you are currently using (ex 2.0).
Then mount the dmg found in the ios directory.
Then run the .pkg installer.
Restart Xcode.
I fixed this by removing the armv6 and i386 architecture from Valid Architecture setting
Only need to remove armv6 from both YourProject and CordovaLib:
The consequences of doing this? Apparently, it's still working on iPhone 3GS, but not the previous versions..