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

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


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


I wanted to report that the response provided by Vinay worked for me. I had to make sure I was in the share extension target, and I added it to the path exactly as suggested above in the Release option, and did not even have to do a clean to get it to regenerate the PCH.

BUT, I was puzzled by this after looking at the setting further and I realized this path was already in the setting. I edited it again, and removed the redundant path, hit 'run' again, and it loaded onto my iPhone and ran fine.

So, I believe that just setting this in the search path forced a recompile on the share extension PCH and all is working again.

I hope this helps others.


I know its too late to answer on this question but still many developers facing the above issue and as per the latest Cordova & ionic version below steps will work in the above error.

As per new update in Cordova some time due to some permission issue or directly run or build iOS platform it's unable to add below file or folders in your iOS project platform :

CordovaLib

so somehow above folder will not add in your project and that's why it's not building your iOS project.

To overcome this issue you need to remove iOS platform from your ionic project and again add it.

Remove iOS platform: sudo ionic cordova platform remove ios

Add it again: sudo ionic cordova platform add ios

By doing this cordova download CordovaLib folder from server and add it into your iOS project and after that users can able to build their project without any error.

recently I faced this issue and I solved by doing the above steps.

Hope this helps others.

Happy coding!