Cordova – Find PhoneGap CDVViewController when archived distribution

I encountered this problem in Cordova/Phonegap version 2.2 in Xcode 4.5.2. This is a new project – so without modifying anything in the www folder Close immediately. When I build in Debug mode, everything goes well. When I try to build the archive in distribution mode (AdHoc or App Store), I get this error:

'Cordova/CDVViewController.h' file not found

Can I post any further information to help clarify the situation?

I have tried several times to start from scratch (as suggested by some similar questions I have seen) and uninstall and reinstall Xcode to get good metrics. My Xcode derived data location is set to Unique (according to Another similar question). I also executed update_cordova_subproject on the project to no avail.

Thank you very much for your help!

I ran into the same problem a few weeks ago, I did some research to try to find the cause And the solution, but finally tried different methods, and then suddenly and randomly, it just worked. What exactly makes it work-I don’t know, but I suggest you to find a way to track and error and try the following methods

I have listed the following suggested solutions in order of relevance (possibility to solve your problem) and complexity (ascending order)

Method 1< /p>

Go to BuildSettings>title>search path and add the following line:

$(OBJROOT)/UninstalledProducts/include

More Information/recommendations can be found here

Method 2

For some reason, when upgrading to the new 2.x version of Cordova, it seems that the dependencies in Cordova are missing. Suppose Cordova The reason for 2.x has changed the way of referencing the framework in the iOS project.
Please try to follow the steps below
This article

Method 3

If A1 and A2 Unable to solve your problem, the error message you received may be somewhat misleading, forcing people to look for alternatives to other potential causes. Certificates and code signing identities will be the next place to study. Try to remove them from keychain/xcode, Undo them from the temporary portal, recreate the new ones and add them to the Xcode project. Try to archive and see if it works.

Method 4

Make sure the main project and CordovaLib .xcodeproj is set to build only active architecture

Other suggestions

You may have tried one or more of them, but just to make sure

> Reinstall cordova in a fresh installation, and explicitly install the command line tool on the latest version of Xcode (exit Xcode before doing this)
>After deleting everything currently contained, copy the old project www folder to the new command
>Please pay close attention to the error console during runtime in the www folder created by the line to see if there are any errors that may further help determine the root cause of this problem.

If these proposed solutions None of your problems have been solved, please let us know, and then we must dig deeper until we find a feasible solution.

I ran into this issue in Cordova/Phonegap version 2.2 in Xcode 4.5.2. This is a new project-so it closes immediately without modifying anything in the www folder. When I build in Debug mode , Everything goes well. When I try to build the archive in distribution mode (AdHoc or App Store), I get this error:

'Cordova/CDVViewController .h' file not found

Can I post any further information to help clarify the situation?

I have tried several times to start from scratch (as suggested by some similar questions I have seen) and uninstall and reinstall Xcode to get good metrics. My Xcode derived data location is set to Unique (according to Another similar question). I also executed update_cordova_subproject on the project to no avail.

Thank you very much for your help!

I ran into the same problem a few weeks ago, I did some research to try to find the cause and solution, but finally tried different methods, Then suddenly and randomly, it just works. What exactly makes it work-I don’t know, but I suggest you to find a way to track and error and try the following methods

I have The following suggested solutions are listed in order of relevance (possibility to solve your problem) and complexity (ascending order)

Method 1

Go to BuildSettings> heading> Search the path and add the following line:

$(OBJROOT)/UninstalledProducts/include

More information/recommendations can be found here

Method 2

For some reason, when upgrading to the new 2.x version of Cordova, it seems that the dependencies in Cordova are missing. Assume that the reason for Cordova 2.x has changed the framework in the iOS project
Please try to follow the steps below
This article

Method 3

If A1 and A2 cannot solve your problem, the error message you receive It may be somewhat misleading in nature, forcing people to look for alternatives to other potential causes. Certificates and code signing identities will be the next place to study. Try to delete them from the keychain/xcode, revoke them from the temporary portal, and recreate new ones. Add them to the Xcode project. Try to archive and see if it works.

Method 4

Make sure that both the main project and CordovaLib.xcodeproj are set to build only the active architecture

p>

Other suggestions

You may have tried one or more of them, but just to make sure

>Reinstall cordova from a fresh installation, in the latest version of Xcode Explicitly install the command line tool on the command line (exit Xcode before doing this)
>After deleting all the content currently contained, copy the old project www folder to the www folder created by the new command line
>run Please pay close attention to the error console to see if there are any errors that may further help determine the root cause of this problem.

If none of these proposed solutions solve your problem, please let us know, and then We must dig deeper until we find a feasible solution.

Leave a Comment

Your email address will not be published.