Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 4.5 and Phonegap 2.0 reference issue

Tags:

xcode

cordova

Yesterday I updated new Xcode 4.5, and I got an error in my build and I am not sure how can I even fix this.

Everything works fine if I build in simulator, but when I try to build for Archive for example, i get this:

ld: warning: ignoring file /Users/corotchi/Library/Developer/Xcode/DerivedData/NJR_IR-ftjwhrqtxwedihfjrbjikbqqttkx/Build/Products/Release-iphoneos/libCordova.a, file was built for archive which is not the architecture being linked (armv7s): /Users/corotchi/Library/Developer/Xcode/DerivedData/NJR_IR-ftjwhrqtxwedihfjrbjikbqqttkx/Build/Products/Release-iphoneos/libCordova.a
Undefined symbols for architecture armv7s:
  "_OBJC_CLASS_$_CDVURLProtocol", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_CDVViewController", referenced from:
      _OBJC_CLASS_$_MainViewController in MainViewController.o
  "_OBJC_METACLASS_$_CDVViewController", referenced from:
      _OBJC_METACLASS_$_MainViewController in MainViewController.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

and more errors bellow, which are the same

Everything worked fine until u updated the Xcode, I had another issue before where I read the formums that I have to remove the "ARMV6" from the build settings, cause it is not supported anymore in new IOS, and after that I get this reference issue.

I appreciate any help, THanks!!!!

like image 324
AlexC Avatar asked Dec 06 '22 12:12

AlexC


1 Answers

Remove armv7s from Valid Architectures from both your project and Cordova(phonegap) project. Also set iOS Deployment target 4.3 or above in both project and Cordova(phonegap) project. After that Clean and Clean Build Folder. This will solve the problem.

like image 189
Moin Uddin Avatar answered Jan 02 '23 20:01

Moin Uddin