Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

still getting <Cordova/CDVViewController.h> file not found error in xcode

I am new in PhoneGap, making a app via Xcode; But I found an error regarding CDVViewController.h. However, the file physically exists there. I am using Xcode 4.6 and Cordova 2.2.0.

like image 570
Mohsin Qureshi Avatar asked May 08 '13 16:05

Mohsin Qureshi


3 Answers

Man, there are a lot of red herring answers to this question out there. This is what worked for me, and is in the documentation for both PhoneGap 2.5 and 3.0 (see here: PhoneGap docs for iOS (look under "missing headers"), using Xcode 4.6.

  1. In Xcode, go to Preferences... > Locations, then click on the Advanced... button.
  2. Make sure the build location radio button is set to "Unique".
  3. Close out the Preferences and Rebuild.
like image 75
eb1 Avatar answered Nov 13 '22 09:11

eb1


Please add this line to your projects Build Settings >> Header Search Paths:

$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include

it's worked on Xcode 7.0 + and iOS 9+.

enter image description here

like image 43
Vvk Avatar answered Nov 13 '22 10:11

Vvk


If you're building to the local build output directory, rather than the new xcode artefact store, you may need to copy the contents of CordovaLib/build into $YOURPROJECT/build.

The same applies if you're using xcodebuild from a terminal.

like image 3
rmc47 Avatar answered Nov 13 '22 08:11

rmc47