Xcode 7.2: In “Archive”: Getting the issue: “Cordova/CDVViewController.h’ file not found ”. While there is no such issues in building the app

Adisheshu RY picture Adisheshu RY · Dec 31, 2015 · Viewed 60.9k times · Source

In iOS, I update 7.2. I'm able to build my existing project to my device with no problem. When it came time to archive the project to prepare for submission to the app store, however, I'm getting a build error - Cordova/CDVViewController.h file not found. I've gone through just about every fix/workaround that I've not found Stack Overflow, and Google, and none of them have worked for me. If I go back to Xcode 6.4 I can build and archive no problem, but I can't build to my device now that it's running iOS 9.1.

I'm guessing it's a configuration issue somewhere with the new Xcode version setup. Has anyone else run into this? Again, the usual suspects (Preferences > Location > Derived Data > Advanced > Unique), Header Search Paths, etc. all seem to be fine.

Thanks, Adisheshu

Answer

ArunDhwaj IIITH picture ArunDhwaj IIITH · Dec 31, 2015

This issues seems to appear in Xcode 7.2 due to search path/include.

Solve this in following way:

  1. Select your [projectName] in Xcode TARGETS.

  2. Go to Build Settings tab.

  3. Make sure that the filter is set to "All" and not "Basic".

  4. Search "Header Search Paths"

  5. Double click and add this path to both "Debug" and "Release": $(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include

  6. Now clean the Project and restart Xcode.

  7. Able to make the Build and Archive.

  8. That's All.