I am experiencing this issue in version 2.2 of Cordova/Phonegap in Xcode 4.5.2. This is a new project - so right off the bat without anything in the www
folder modified. When I build in Debug mode everything goes fine. When I try to build for archiving in distribution mode (AdHoc or App store) I get this error:
'Cordova/CDVViewController.h' file not found
Is there any further information that I can post to help clarify the situation?
I have tried starting from scratch several times (as per the suggestion of some similar questions I've seen asked) as well as uninstalling and reinstalling Xcode for good measure. My Xcode derived data location is set to Unique (as per another similar question). I have also performed update_cordova_subproject
on the project to no effect.
Thanks so much for any help here!
I had the same problem a couple of weeks ago, I did some research in attempts to find the cause and solution to this but ended up trying different approaches and then suddenly and as randomly, it just worked. What exactly made it work - I cannot tell but I would suggest you to go for a trail and error approach and try out the following
I've listed the suggested solutions below in order of relevance (likelihood to solve your issue) as well as by complexity (ascending)
Go to BuildSettings > Header > Search Paths and add the following line:
$(OBJROOT)/UninstalledProducts/include
More info/suggestions can be found here
For some reason, it appears as if the dependencies in Cordova gets missing when upgrading to a new 2.x version of Cordova. This is assumed to the cause of Cordova 2.x having changed how the framework is referenced in iOS projects. Try following the steps of This article
If A1 and A2 fails to solve your issue, the error message you receive may be of somewhat misleading nature, forcing one to look at alternative approaches to other potential causes. Certificates and Code Signing identities would be the next place to look into. Try removing them from keychain/xcode, revoke them from within the Provisional Portal, recreate new ones and add them to your Xcode project. Try archiving and see if it works.
Make sure both your main project and the CordovaLib.xcodeproj are set to Build Active Architecture Only
you may have tried one or more of these but just to make sure
Please let me know if neither of these proposed solutions solved your issue, then we'll just have to dig deeper until we find a working solution.
Xcode 6.x
add $(OBJROOT)/UninstalledProducts/include
to BuildSettings->Header Search Paths
Xcode 7.x
add $(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include
to BuildSettings->Header Search Paths
it's work for me . hope it can help you..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With