Phonegap Cdvviewcontroller.H File Not Found When Archiving for iOS

Phonegap CDVViewController.h file not found when Archiving for iOS

Xcode 6.x

add $(OBJROOT)/UninstalledProducts/include to BuildSettings->Header Search Paths

Xcode 7.x

add $(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include to BuildSettings->Header Search Paths

1.Double click the and you can add this in.

2.Change $(OBJROOT)/UninstalledProducts/include to $(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include

Sample Image

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.

Phonegap CDVViewController.h not found when archiving for distribution

After trying every solution I could find (including the ones Jonathan posted for this question) with no success I have solved my problem. Hopefully this answer added to the list of others will help someone else. If my answer does not apply to your similar situation please check out the list below posted by Jonathan which is a comprehensive list of other possible solutions.

My somewhat unique situation: In a pre 2.0 version of Phonegap (when I was able to compile) I had created a custom build configuration for AdHoc and AppStore. The defaults we have are "Debug" and "Release" and my two custom configurations were created so I didn't have to switch the code signing certificates when I switched from an AppStore release to an AdHoc build.

The problem/solution: In post 2.0 Phonegap we've got an instance of CordovaLib.xcodeproj subproject (this is new)... which means if I'm going to use a custom build in my main project I have to add that custom build configuration in this subproject as well.

Project Navigator >> Click CordovaLib.xcodeproj >> Click on the project CordovaLib >> Configurations >> make sure whichever build you are going to use exists (by name) in this list. No further configuration is necessary assuming you've already dealt with this in your main project having created these custom build configurations in the past.

iOS10.3.1 - Cordova/CDVViewController.h file not found - After Upgrade

in Xcode 8.3.2 this solved by running:

ionic resources
ionic platform remove ios
ionic platform add ios

src: https://forum.ionicframework.com/t/cdvviewcontroller-h-file-not-found/89548

Cordova iOS - New Xcode Configuration / CDVViewController.h Not Found

I had the same problem for a couple of weeks. Now I found the answer here

If you want to add a new configuration by duplicating for example "Debug" to be able to change some build setting, you have to add the same configuration to the CordovaLib sub-project. You have to make sure that the CordovaLib sub-project has the same set of configurations as your main project. Otherwise the build folder for the Cordova Project is different than the build folder of the main project. Thus files like CDVViewController.h can not be found.

  1. Select CordovaLib sub-project
  2. Click on the project icon (above the Targets)
  3. Select Info tab
  4. Expand Configurations

Add the same set of configurations as in the main project:

  1. Click + button
  2. Select Duplicate "Release" Configuration or "Debug" Configuration, depending on your needs
  3. Give the right name for configuration. Copy-paste it from main project settings.

Adding "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" to the project Header Search Paths only solves issues with archiving release builds.

Cordova/CDVViewController.h file not found

I also met this problem, and finally find out why.Did you create a new Configuration by duplicating "Release" Configuration and set "Archive"'s Build Configuration to the new Configuration? Don't do it,just keep Build Configuration for "Release".Then everything will be OK.


Or you should keep your project and the CordovaLib project for the same configuration.



Related Topics



Leave a reply



Submit