Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS PhoneGap Build Failure

Tags:

xcode

ios

cordova

I am new to PhoneGap for iOS and Xcode. I am having an issue with my app that worked on Android phones just fine. I'm able to build and run the app in the iOS simulator but when I archive it to test on devices I get the error below. I've searched all over and cannot find something that works.

Error:

ld: warning: ignoring file /Users/danlehman/Library/Developer/Xcode/DerivedData/HelloWorld-ebkivbdaivqchkgycifnnpgixspn/Build/Intermediates/ArchiveIntermediates/HelloWorld/BuildProductsPath/Release-iphoneos/libCordova.a, file was built for archive which is not the architecture being linked (armv7s): /Users/danlehman/Library/Developer/Xcode/DerivedData/HelloWorld-ebkivbdaivqchkgycifnnpgixspn/Build/Intermediates/ArchiveIntermediates/HelloWorld/BuildProductsPath/Release-iphoneos/libCordova.a
Undefined symbols for architecture armv7s:
  "_OBJC_METACLASS_$_CDVViewController", referenced from:
      _OBJC_METACLASS_$_MainViewController in MainViewController.o
  "_OBJC_CLASS_$_CDVViewController", referenced from:
      _OBJC_CLASS_$_MainViewController in MainViewController.o
  "_OBJC_CLASS_$_CDVURLProtocol", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
like image 350
mav_baumer15 Avatar asked Jun 18 '13 19:06

mav_baumer15


1 Answers

I was getting a similar error for Cordova 2.7, Xcode 5 and iOS7 building on iPhone 4S. I changed one setting, and it built correctly.

Select your app. Go to Build Settings then Valid Architectures. Change to:

armv7

My previous setting was:

arm64 armv7 armv7s

Clean and build. It seems to be related to armv7s. One side effect of getting it running is that the status bar is transparent and floating on top of the app. That is another topic though, and related to iOS7.

like image 133
skymook Avatar answered Sep 29 '22 12:09

skymook