Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

‘Cordova/CDV.h’ file not found in Xcode 8.2.1

I have one hybrid Cordova project, which is running fine Xcode 5.1.1, but when I am trying to Archive the project in Xcode 8.2.1 with ‘Generic iOS Device’ I am getting the error ‘Cordova/CDV.h’ is not found.

I read many articles about this problem, but none could solve my problem. Most answers are telling to follow the below steps:

"Add this line to your Build Settings -> Header Search Paths: $(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include "

I have did this but problem not solved, getting another error ‘ld: library not found for -lcrt1.3.1.o clang: error: linker command failed with exit code 1 (use -v to see invocation)’

Also I have changed the bitcode YES to NO in target Build Settings, but no fruitful result.

Project cordova version 3.4.0 where installed cordova version in machine 6.4.0

Has anybody experience with this kind of problem? Please, can anyone help? I've been working on this for days.

like image 551
kousik kumar Ghosh Avatar asked Jan 18 '17 13:01

kousik kumar Ghosh


1 Answers

I got it work by following below steps

  1. In your Xcode project settings select TARGETS
  2. Within TARGETS select the Build Settings tab
  3. In the sub-options under the Build Settings tab be sure to select All
  4. Scroll down to the Search Paths section
  5. Locate Header Search Paths
  6. Add the following configuration to the Release option (as a new value on its own line): $(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include
  7. Clean the project: Command + Shift + K
  8. Restart Xcode
like image 68
Vinay Patil Avatar answered Sep 29 '22 17:09

Vinay Patil