If you're using Cordova PhoneGap and have recently upgraded to Xcode 7.2 you might be experiencing the following build error when attempting to create an archive for submission to the Apple App store:
Cordova/CDVViewController.h file not found
It's an odd one because you've double checked your software installation; PhoneGap and Xcode are up to date and you can publish the app to an iOS device for testing without issue.
As this only happens when creating archives for app submissions the error doesn't seem to make any sense whatsoever.
Thankfully the solution is incredibly simple to implement...
- In your Xcode project settings select TARGETS
- Within TARGETS select the Build Settings tab
- In the sub-options under the Build Settings tab be sure to select All
- Scroll down to the Search Paths section
- Locate Header Search Paths
- Add the following configuration to the Release option (as a new value on its own line): $(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include
- Clean the project: Command + Shift + K
- Restart Xcode
The following screenshot demonstrates what you should see in Xcode 7.2 after following steps 1 to 6 (the line highlighted in blue displays the added configuration):
Now, when you reopen your project you should be able to archive your application ready to submit to the Apple App store.