Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova error in Xcode - No such file or directory

I've been trying to create a Cordova / Phonegap application in Xcode on a new computer. But it doesn't seem to work. When I run the application on either a simulator or my iPhone I get an error message saying that 'libCordova.a' is not found.

1 error message and 5 issues:

/Users/Tim/Documents/Dropbox/Applicaties/Business/FirstProject/Xcode/FirstProject.xcodeproj
/Users/Tim/Documents/Dropbox/Applicaties/Business/FirstProject/Xcode/FirstProject.xcodeproj Missing "[email protected]" launch image
/Users/Tim/Documents/Dropbox/Applicaties/Business/FirstProject/Xcode/FirstProject/Classes/AppDelegate.m
/Users/Tim/Documents/Dropbox/Applicaties/Business/FirstProject/Xcode/FirstProject/Classes/AppDelegate.m:73:25: 'invokeString' is deprecated
/Users/Tim/Documents/Dropbox/Applicaties/Business/FirstProject/Xcode/FirstProject/Classes/MainViewController.m
/Users/Tim/Documents/Dropbox/Applicaties/Business/FirstProject/Xcode/FirstProject/Classes/MainViewController.m:117:15: 'invokeString' is deprecated
/Users/Tim/Documents/Dropbox/Applicaties/Business/FirstProject/Xcode/FirstProject/Classes/MainViewController.m:121:93: 'invokeString' is deprecated
clang: error: no such file or directory: '/Users/Tim/Library/Developer/Xcode/DerivedData/FirstProject-ctanrqwggcfoubbeqbjrfvcqozpg/Build/Products/Debug-iphoneos/libCordova.a'
  • Cordova version 2.1.0
  • Xcode version 4.5.1

I have not been able to install the latest cordova on my computer, on version 2.0.0 there was an installation program but in the latest version this is gone? And I already set the 'Build Active Architecture Only' to Yes and the 'Build Location' to Unique.

Thank you very much in advance.

like image 349
Ruud Avatar asked Oct 04 '12 08:10

Ruud


3 Answers

I've had exactly the same error. The problem was that I hadn't set the 'Build Active Architecture Only' for both projects. Your main project & the CordovaLib.xcodeproj.

Hope this helps!

like image 171
Think Graphical Avatar answered Nov 18 '22 04:11

Think Graphical


This solved my problem:

  • Open your project in Xcode.
  • Click on your project.
  • Click on your project under Targets.
  • Hit the build phases tab.
  • Open “Copy Bundle Resources” near the bottom.
  • Look for any resources listed in red, and drag/drop them manually there.

Problem solved!

like image 4
Neeku Avatar answered Nov 18 '22 05:11

Neeku


in the CordovaLib Build Settings. Under Architectures -> Valid Architectures, I removed armv6. this worked for me! (iphone 4s phonegap 2.2)

like image 1
Francesco Avatar answered Nov 18 '22 05:11

Francesco