Post Xcode 7.1 Upgrade build issue – cordova/CDVViewController.h file not found

If you have recently upgraded your Xcode to 7.1 version, you will start getting cordova/CDVViewController.h file not founderror. You would be surprised that earlier build was working perfectly fine with Xcode 6.4 and Xcode 7.0

Screen Shot 2015-11-26 at 15.43.18

Screen Shot 2015-11-26 at 15.43.24

To fix this error follow these steps:

In Xcode select the project and go to Build Settings of the project and the Search for Header Search Path It will show you below shown screen.

Screen Shot 2015-11-26 at 15.48.09

Double click on the Multiple values row and it will show you a list pop-up now add a new row to this list and add content


Then archive/build the app and you will see everything works fine.

If you want to add this content from command line instead of directly adding it using XCODE IDE, then use command:

xcodebuild HEADER_SEARCH_PATHS="\$(TARGET_BUILD_DIR)/usr/local/lib/include \$(OBJROOT)/UninstalledProducts/include \$(BUILT_PRODUCTS_DIR) \$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include"


Reason behind this issue is, release of new platforms like tvOS, there is an extra folder has been created to archive intermediates, namely a folder with the name of the os. earlier we had "$(OBJROOT)/UninstalledProducts/include" and now we should have "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" To make xcode 7.1 work we should have these both paths added to `HEADERSEARCHPATHS


4 thoughts on “Post Xcode 7.1 Upgrade build issue – cordova/CDVViewController.h file not found

Add yours

  1. Thanks for writing.
    Facing same issue on Xcode Version 7.1 (7B91b).

    I Tried:
    Adding header search path as mentioned.
    Changing import statements from to “” .
    Changing Preferences –> Location –> Advance to unique.

    I am using:
    Cordova Platform: 6.3.1
    Cordova android 5.2.2
    Cordova ios 4.2.1


    In file included from /Users/myProject/phonegap/platforms/ios/Phonegap/Classes/MainViewController.m:28:
    /Users/myProject/phonegap/platforms/ios/Phonegap/Classes/MainViewController.h:28:9: fatal error: ‘Cordova/CDVViewController.h’ file not found
    #import “Cordova/CDVViewController.h”
    In file included from /Users/myProject/phonegap/platforms/ios/Phonegap/Classes/AppDelegate.m:28:
    /Users/myProject/phonegap/platforms/ios/Phonegap/Classes/AppDelegate.h:28:9: fatal error: ‘Cordova/CDVViewController.h’ file not found
    #import “Cordova/CDVViewController.h”
    1 error generated.

    /Users/myProject/phonegap/platforms/ios/Phonegap/Plugins/cordova-plugin-device/CDVDevice.m:24:9: fatal error: ‘Cordova/CDV.h’ file not found
    #import “Cordova/CDV.h”

    not sure what I am missing. Help is much appreciated.

  2. This does not work with Xcode 8. You have to reinstall latest version of cordova, and remove platform and add it again

    npm un cordova
    sudo npm install -g cordova // yarn global add cordova

  3. I know that there has been a lot of discussion on this topic but I haven’t seen any answers that address this error for a remotebuild.

    I have an existing Cordova application in Visual Studio that I am trying to make a minor change to. I build using remotebuild to a MacInCloud machine and unfortunately that machine has been updated to the latest XCode. I hadn’t done a build in about 6 months but because of the updates to the MacInCloud machine, I had to update my Cordova project to newer Cordova CLI and newer versions of the plugins that I used.

    After resolving numerous other issues I’m stuck on this one:

    fatal error: ‘Cordova/CDVViewController.h’ file not found (TaskId:14)

    I’ve read a lot of posts about fixes for this and most involve updating the Header Search Path in the XCode project. Nowhere have I found anything to indicate how that would be done when building remote from Visual Studio.

    I always see that you go to Build Settings > Header > Search Paths but I don’t see a Build Settings menu item in XCode. Does anyone know if this is possible to set for a remotebuild and if so where is it done?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a website or blog at

Up ↑

%d bloggers like this: