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

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.


After trying every solution with no success I ran:

cordova platform update ios

This fixed it for me. (XCODE 7.3.1, Cordova 6.3.0)

Reference: Cordova app failing to Archive with Xcode 7.1 (Cordova/CDVViewController.h file not found)


If adding this line:

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

to the headers-search-path (as described in 'im3r3k' answer) didn't fixed this issue, also set this:

Build Settings -> Architectures -> Build Active Architecture Only -> YES

Tags:

Ios9

Xcode7.2