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:
Select your
[projectName]
in Xcode TARGETS.Go to Build Settings tab.
Make sure that the filter is set to "All" and not "Basic".
Search "Header Search Paths"
Double click and add this path to both "Debug" and "Release":
$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include
Now clean the Project and restart Xcode.
Able to make the Build and Archive.
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