Apple Mach-O Linker Error on Xcode 6.0.1

I updated my Xcode to 6.0.1. Before this update, I was able to create my project both in the simulator and on my device. But now it gives me an Apple Mach-O Linker error

I traveled a lot. I deleted the DerivedData folder. Still a problem.

I am creating a Phonegap application. Please help me.

Undefined symbols for architecture arm64: "_OBJC_CLASS_$_CDVWebViewDelegate", referenced from: objc-class-ref in CDVInAppBrowser.o "_OBJC_CLASS_$_CDVInvokedUrlCommand", referenced from: objc-class-ref in CDVContacts.o objc-class-ref in CDVFile.o "_OBJC_METACLASS_$_CDVViewController", referenced from: _OBJC_METACLASS_$_MainViewController in MainViewController.o "_OBJC_CLASS_$_CDVPlugin", referenced from: _OBJC_CLASS_$_CDVLogger in CDVLogger.o _OBJC_CLASS_$_CDVContacts in CDVContacts.o _OBJC_CLASS_$_CDVDevice in CDVDevice.o _OBJC_CLASS_$_CDVNotification in CDVNotification.o _OBJC_CLASS_$_CDVFile in CDVFile.o _OBJC_CLASS_$_CDVFileTransfer in CDVFileTransfer.o _OBJC_CLASS_$_CDVInAppBrowser in CDVInAppBrowser.o ... "_OBJC_METACLASS_$_CDVPlugin", referenced from: _OBJC_METACLASS_$_CDVLogger in CDVLogger.o _OBJC_METACLASS_$_CDVContacts in CDVContacts.o _OBJC_METACLASS_$_CDVDevice in CDVDevice.o _OBJC_METACLASS_$_CDVNotification in CDVNotification.o _OBJC_METACLASS_$_CDVFile in CDVFile.o _OBJC_METACLASS_$_CDVFileTransfer in CDVFileTransfer.o _OBJC_METACLASS_$_CDVInAppBrowser in CDVInAppBrowser.o ... "_OBJC_CLASS_$_CDVViewController", referenced from: _OBJC_CLASS_$_MainViewController in MainViewController.o objc-class-ref in CDVDevice.o objc-class-ref in CDVFile.o "_CDVLocalNotification", referenced from: -[AppDelegate application:didReceiveLocalNotification:] in AppDelegate.o "_OBJC_METACLASS_$_CDVCommandDelegateImpl", referenced from: _OBJC_METACLASS_$_MainCommandDelegate in MainViewController.o "_OBJC_CLASS_$_CDVPluginResult", referenced from: objc-class-ref in CDVContacts.o objc-class-ref in CDVDevice.o objc-class-ref in CDVNotification.o objc-class-ref in CDVFile.o objc-class-ref in CDVLocalFilesystem.o objc-class-ref in CDVAssetLibraryFilesystem.o objc-class-ref in CDVFileTransfer.o ... "_OBJC_CLASS_$_CDVCommandDelegateImpl", referenced from: _OBJC_CLASS_$_MainCommandDelegate in MainViewController.o "_OBJC_CLASS_$_CDVUserAgentUtil", referenced from: objc-class-ref in CDVInAppBrowser.o "_OBJC_CLASS_$_CDVCommandQueue", referenced from: _OBJC_CLASS_$_MainCommandQueue in MainViewController.o "_OBJC_METACLASS_$_CDVCommandQueue", referenced from: _OBJC_METACLASS_$_MainCommandQueue in MainViewController.o "_CDVPluginHandleOpenURLNotification", referenced from: -[AppDelegate application:handleOpenURL:] in AppDelegate.o -[CDVInAppBrowser openInSystem:] in CDVInAppBrowser.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) 
+5
source share
5 answers

Such problems usually occur when upgrading Xcode, but any third-party tool that you use cannot be updated using this armv64 architecture.

So, click on your Project Navigator with Xcode.

Click On BuildSettings on it.

Find Valid Architectures in it.

Just double click on it and remove armv64 .

Make sure that there are only armv7 and armv7s .

If this does not work, try also removing armv7s .

Please check that all of your frameworks are connected correctly and referenced. Try deleting and adding frames for this third-party tool again.

Please check the links to all frameworks.

In my case, it worked for me.

Clean and create your project. Now it should work fine.

Hope this helps you.

+6
source

I found a solution, not a monkey patch, its project fix. What we need to do to change the architectures supported by the application:

  • Go to Project β†’ Build Settings (check to see everything) β†’ Architectures β†’ Standard architectures (armv7 armv7s arm64)
  • Go to the Cordoba lib project -> Build Settings (check to see everything) -> Architectures :
    • Open the debug tree and delete all items inside them
    • Open the Release tree and do the same
  • Go to the Cordoba lib project (select the target this time) and do the same in step 2

See youtube video for more details.

+4
source

You can remove 64-bit support, as Manten said, but to fit the app store ( starting February 1, 2015 ) you need it. I would suggest starting the process of updating all your frameworks, etc. Up to versions that support 64-bit.

From what I saw and experienced using Cocoapods , this is the easiest way to track, since it’s very easy to manage the framework version and update, as well as switching to other versions. I would advise finding out what your current versions of the framework are and slowly update them from there until you find a version with 64-bit support that works with your current build.

Another method I found that usually fixes mach-o errors is the following:

  • Make sure Target => Architectures => Build Active Architectures set to NO.
  • Make sure Target => Search Paths => Framework search paths and Library search paths have $(inherited) as the first entry.

Converting to 64-bit can be a really difficult task, but it will probably be worth it in the end.

+1
source

I have the same problem when I imported some git project, finally found a solution when changing the development goal.

go to Project-> General-> Development Info and change the deployment target.

0
source

I uninstalled all Xcode 6. I updated the handset on my Mac and installed it again. Created a new phone game project. I copied the code (www-folder) to a new project. Build it. And it works great in Xcode 6.

Sorry for the delayed reply.

0
source

Source: https://habr.com/ru/post/1203381/


All Articles