0

I am trying to archive my IOS project in Xcode 5 for distribution and I get an error which says "Apple Mach-O Link Error and:

Undefined symbols
for architecture arm64: "_OBJC_METACLASS_$_CDVCommandDelegateImpl",
referenced from: _OBJC_METACLASS_$_MainCommandDelegate in MainViewController.o "_CDVLocalNotification",
referenced from: -[AppDelegate application: didReceiveLocalNotification: ] in AppDelegate.o "_OBJC_CLASS_$_CDVCommandDelegateImpl",
referenced from: _OBJC_CLASS_$_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_METACLASS_$_CDVCommandQueue",
referenced from: _OBJC_METACLASS_$_MainCommandQueue in MainViewController.o "_CDVPluginHandleOpenURLNotification",
referenced from: -[AppDelegate application: handleOpenURL: ] in AppDelegate.o
ld: symbol(s) not found
for architecture arm64
clang: error: linker command failed with exit code 1(use - v to see invocation)

In short how do I fix this?

Thanks

Christopher Rogers
  • 6,759
  • 1
  • 22
  • 13
Joe Shmoe
  • 5
  • 3

2 Answers2

0

There are a number of related answers for this situation, which stems from Apple adding arm64 to the default architectures in Xcode 5.1.

Looks like you are using cordova, so I'd start here:

xcode 5.1: libCordova.a architecture problems

Community
  • 1
  • 1
z00b
  • 356
  • 2
  • 3
0

do the following steps

  1. Select your Project icon
  2. Choose Build Settings.
  3. For "Architectures", select $ARCHS_STANDARD - Standard architectures (armv7, armv7s, arm64)
  4. For "Valid Architectures", add "arm64"
  5. Select your CordovaLib.xcodeproj icon
  6. In the Build Settings for the Project (not Target), delete the conditional architecture settings (hover to see the minus sign)
  7. For "Architectures", select $ARCHS_STANDARD - Standard architectures (armv7, armv7s, arm64)
  8. For "Valid Architectures", add "arm64"
  9. Goto 6, but now do it for "Target"

if you found any issue please let me know.

Nitin
  • 1,383
  • 10
  • 19
  • If you are agree with answer then please vote up the answer so it will help the other too. – Nitin Aug 11 '14 at 08:56