Ios – Phonegap CDVViewController.h file not found when Archiving for iOS

cordovaiosxcode

I'm currently using Phonegap 2.0 to develop an iOS App in XCode. The app builds and runs fine in the emulator and also on the testing devices.

The problem appears when I try to archive the app for distribution. The archive fails with the following message:

CDVViewController.h file not found.

Any ideas?

Best Answer

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 <multiple values> and you can add this in.

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

enter image description here