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.
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.
"$(BUILT_PRODUCTS_DIR)" "$(OBJROOT)/UninstalledProducts/include" "$(TARGET_BUILD_DIR)/usr/local/lib/include"
phonegap add podfile must include above
You may need to update your CordovaLib sub-project reference.
Run the script below where the first parameter is the path to your project's .xcodeproj file:
./update_cordova_subproject path/to/your/project/xcodeproj
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+.
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.