- Home /
Xcode - Lots of Apple Mach-O Linker Errors When Archiving
I'm trying to make an archive build in Xcode in order to use Testflight, but I get a ton of linker errors that prevent the build. I don't have this problem when I'm building directly to device. What am I doing wrong/what am I not doing that I need to? Thanks!
first copy error code/message and past,so that it can be resolved
Answer by awardell · Mar 26, 2014 at 10:36 PM
So apparently the problem is fixed as long as I have an iOS device hooked up... Weird, but ok.
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
Answer by supernat · Mar 25, 2014 at 06:11 AM
I'll take a guess at it. The most common thing that gets me is I forget to select the iOS Device option for the build target, and it attempts to build for the Emulator which lacks a ton of libraries. Usually, when you connect a phone or iDevice though, it will automatically switch to build for that device. Just check your build target dropdown and make sure it's set to iOS Device or your device, not to a specific emulator device.
That sounds like it certainly could be the problem. Having difficulty finding the build target option in xcode though, could you explain what page it's on?
It's in the top left corner of XCode. You have the Triangle, then the square (for Run and Stop), then the build target pulldown (it doesn't look like a pulldown in Apple's infinite wisdom, but click on it.) They call it a scheme if you move the mouse over it.
Ah okay, I had seen that, but the only option for the scheme is already iOS Device, and that was selected, so it must be something else. Thank you though!