Random thoughts & observations

From the mundane to the profound and everything in between here’s what’s rocking our world

Resolving Xcode 7.2 issue with Cordova CDVViewController.h file not found

Posted: February 22, 2016
Written by: Saints At Play
Category: Apple

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...

  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

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):

Xcode Targets set-up‚Äč

Now, when you reopen your project you should be able to archive your application ready to submit to the Apple App store.

« Return to Posts



February 23, 2016

Thank you very much, that fixed my problem!

Posting comments after three months has been disabled.