Cherif
Cherif

Reputation: 5383

iOS app : running on simulator but not building the.app

I am developping an iOS app with Cordova. The application runs perfectly on my iPhone 5 (iOS 7.1), runs perfectly on the simulator but I have errors when I try to run it on my friend iPhone and I can't generate the .app file.

Here are the errors I get :

ld: warning: ignoring file /Users/cherif/Library/Developer/Xcode/DerivedData/Twimbee-apcdinaymdyzzqbxokrfwnthqoes/Build/Intermediates/ArchiveIntermediates/Twimbee/BuildProductsPath/Release-iphoneos/libCordova.a, missing required architecture arm64 in file /Users/cherif/Library/Developer/Xcode/DerivedData/Twimbee-apcdinaymdyzzqbxokrfwnthqoes/Build/Intermediates/ArchiveIntermediates/Twimbee/BuildProductsPath/Release-iphoneos/libCordova.a (2 slices)
Undefined symbols for architecture arm64:
  "_OBJC_METACLASS_$_CDVCommandDelegateImpl", referenced from:
      _OBJC_METACLASS_$_MainCommandDelegate in MainViewController.o
  "_OBJC_CLASS_$_CDVCommandQueue", referenced from:
      _OBJC_CLASS_$_MainCommandQueue in MainViewController.o
  "_OBJC_METACLASS_$_CDVViewController", referenced from:
      _OBJC_METACLASS_$_MainViewController in MainViewController.o
  "_OBJC_CLASS_$_CDVViewController", referenced from:
      _OBJC_CLASS_$_MainViewController in MainViewController.o
      objc-class-ref in CDVDevice.o
  "_OBJC_METACLASS_$_CDVCommandQueue", referenced from:
      _OBJC_METACLASS_$_MainCommandQueue in MainViewController.o
  "_CDVPluginHandleOpenURLNotification", referenced from:
      -[AppDelegate application:handleOpenURL:] in AppDelegate.o
  "_OBJC_CLASS_$_CDVCommandDelegateImpl", referenced from:
      _OBJC_CLASS_$_MainCommandDelegate in MainViewController.o
  "_OBJC_CLASS_$_CDVPluginResult", referenced from:
      objc-class-ref in FacebookConnectPlugin.o
      objc-class-ref in CDVLocation.o
      objc-class-ref in CDVDevice.o
      objc-class-ref in PushPlugin.o
  "_CDVLocalNotification", referenced from:
      -[AppDelegate application:didReceiveLocalNotification:] in AppDelegate.o
  "_OBJC_CLASS_$_CDVPlugin", referenced from:
      _OBJC_CLASS_$_FacebookConnectPlugin in FacebookConnectPlugin.o
      _OBJC_CLASS_$_CDVLogger in CDVLogger.o
      _OBJC_CLASS_$_CDVLocation in CDVLocation.o
      _OBJC_CLASS_$_CDVDevice in CDVDevice.o
      _OBJC_CLASS_$_PushPlugin in PushPlugin.o
  "_OBJC_METACLASS_$_CDVPlugin", referenced from:
      _OBJC_METACLASS_$_FacebookConnectPlugin in FacebookConnectPlugin.o
      _OBJC_METACLASS_$_CDVLogger in CDVLogger.o
      _OBJC_METACLASS_$_CDVLocation in CDVLocation.o
      _OBJC_METACLASS_$_CDVDevice in CDVDevice.o
      _OBJC_METACLASS_$_PushPlugin in PushPlugin.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am new to iOS and xCode, please help !

Upvotes: 1

Views: 3255

Answers (3)

Nurdin
Nurdin

Reputation: 23893

Build Settings > Architectures

enter image description here

Upvotes: 0

natijauskas
natijauskas

Reputation: 183

Ok!I had the same problem. Do that:

  1. Click on your project (targets)
  2. Click on Build Settings
  3. Under Library Search Paths, delete the paths

Good luck ;-)

Upvotes: 0

Cherif
Cherif

Reputation: 5383

I solved the problem. There are actually little Cordova issues with xCode 5.1 when building for arm64 devices. There are some simple build settings configuration to do. Here is a short tutorial : http://shazronatadobe.wordpress.com/2014/03/12/xcode-5-1-and-cordova-ios/

Upvotes: 2

Related Questions