- Home /
Mach-O Linker error Xcode
I just completed an iOS project in Unity and am trying to build and run it in Xcode. Admittedly, I'm pretty clueless when it comes to Xcode, but my app won't run because I have about a hundred Mach-O linker errors on the side. I'm using 4.6.3. Any advice how to get this fixed?
Update: So I tried to delete my derived data which seemed to fix it and I was successfully able to run my app but it stopped because I didn't have the Unity splash screen. Would deleting my derived data do this? I can't think of anything else that would delete the splash screen. The problem is the derived data isn't arm64, but I'm using Unity 4.6.3 so shouldn't it be arm64? I'm not using any plugins. I'm really confused.
Answer by Bendik74 · Mar 10, 2015 at 09:37 AM
Hi,
I have had the same problem. But the one thing you must not do, is verify your project in Xcode, just compile as is. I think the linker errors will go away then,
hmmm not, if there is an error, it just does not disappear because you think it will.
Answer by alok-kr-029 · Mar 10, 2015 at 07:40 AM
I was also getting this bug when i used facebook third party plugin I solved it by commenting those error lines in xcode
if you are using Iads or social media try to import it in xcode
hope it will help
Answer by fafnir · Mar 10, 2015 at 04:43 PM
The first errors are related to Metal, and that API will only build on devices it was made for (just the very latest ios devices). The other error I can't really say anything about. Did you remove any files manually?
No I didn't remove any files manually. Here are a few more of the errors I got. Sorry it's so messy.
ld: warning: ignoring file /Users/jeffhotz/Dots or Die/Dots or Die/Libraries/libiPhone-lib.a, file was built for archive which is not the architecture being linked (arm64): /Users/jeffhotz/Dots or Die/Dots or Die/Libraries/libiPhone-lib.a Undefined symbols for architecture arm64: "UnityFinished$$anonymous$$etalFrame", referenced from: __TeardownFrameRendering$$anonymous$$TL_block_invoke in $$anonymous$$etalHelper.o "_UnityGetCommandBuffer$$anonymous$$etal", referenced from: _Present$$anonymous$$TL in $$anonymous$$etalHelper.o "_UnitySetAsDefaultFBO$$anonymous$$etal", referenced from: _PreparePresent$$anonymous$$TL in $$anonymous$$etalHelper.o "_UnityDestroyExternalSurface$$anonymous$$TL", referenced from: _DestroyUnityRenderBuffers$$anonymous$$TL in $$anonymous$$etalHelper.o "_UnityCreateExternalColorSurface$$anonymous$$TL", referenced from: _CreateUnityRenderBuffers$$anonymous$$TL in $$anonymous$$etalHelper.o _PrepareRendering$$anonymous$$TL in $$anonymous$$etalHelper.o "_UnityCreateExternalDepthSurface$$anonymous$$TL", referenced from: _CreateUnityRenderBuffers$$anonymous$$TL in $$anonymous$$etalHelper.o "_UnityCreateDummySurface$$anonymous$$TL", referenced from: _CreateUnityRenderBuffers$$anonymous$$TL in $$anonymous$$etalHelper.o "_UnityADInterstitialADWasLoaded", referenced from: -[UnityInterstitialAd interstitialAdDidLoad:] in iAD.o "_UnityADBannerViewWasLoaded", referenced from: -[UnityADBanner bannerViewDidLoadAd:] in iAD.o
"_UnityADBannerViewWasClicked", referenced from: -[UnityADBanner bannerViewActionDidFinish:] in iAD.o "_UnityReportWWWReceivedData", referenced from: -[UnityWWWConnectionDelegate connection:didReceiveData:] in WWWConnection.o
"_UnityUseAnimatedAutorotation", referenced from: -[UnityViewControllerBase willRotateToInterfaceOrientation:duration:] in UnityViewControllerBase.o "_mono_aot_register_module", referenced from: Register$$anonymous$$ono$$anonymous$$odules() in Register$$anonymous$$ono$$anonymous$$odules.o "_mono_aot_module_Assembly_UnityScript_firstpass_info", referenced from: Register$$anonymous$$ono$$anonymous$$odules() in Register$$anonymous$$ono$$anonymous$$odules.o "_mono_aot_module_Boo_Lang_info", referenced from: Register$$anonymous$$ono$$anonymous$$odules() in Register$$anonymous$$ono$$anonymous$$odules.o "_UnityForcedPlayerLoop", referenced from: UnityRepaintImpl(bool) in UnityAppController+Rendering.o "_UnityPlayerLoop", referenced from: UnityRepaintImpl(bool) in UnityAppController+Rendering.o "_mono_aot_module_UnityEngine_UI_info", referenced from: Register$$anonymous$$ono$$anonymous$$odules() in Register$$anonymous$$ono$$anonymous$$odules.o "_UnityInputProcess", referenced from: UnityRepaintImpl(bool) in UnityAppController+Rendering.o
"_UnityCreateUpdateExternalColorSurfaceGLES", referenced from: _CreateUnityRenderBuffersGLES in GlesHelper.o "_mono_aot_module_Assembly_UnityScript_info", referenced from: Register$$anonymous$$ono$$anonymous$$odules() in Register$$anonymous$$ono$$anonymous$$odules.o "_UnityParseCommandLine", referenced from: _main in main.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
http://codewithchris.wpengine.netdna-cdn.com/img/adding_iad_framework_to_xcode.jpg
Have you added the frameworks and libraries
Answer by sudhir_kotila · Mar 11, 2015 at 08:11 AM
which social plugins you are implemented in you project ? (are you implements Applovin,Facebook ?) This error is confling with unity 4.6+.
None. I'm not using iAd, and I don't know what have of the stuff is so it all seems bizarre to me. I didn't install any plugins. I am using 4.6.3. Xcode is Greek to me.
Interestingly, after the app crashes, the powered by Unity splash screen comes up through the multitasking view.
@sudhir_kotila I am also getting same error. I am using applovin, chartboost and revmob plugins.
Answer by MrRetroCentral · Dec 06, 2015 at 03:38 AM
I had the same problem. I made a video to show you how to fix it. https://www.youtube.com/watch?v=j3UzJSRex_E
Your answer
Follow this Question
Related Questions
UnityAds has UIWebView which has been deprecated by Apple 3 Answers
Building to IOS 2 Answers
Rate Game and More Games Urls for Apple Store 0 Answers
How to build a native plugin with multiple platform support? 0 Answers
dyld`dyld_fatal_error on xCode 1 Answer