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!

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.

So apparently the problem is fixed as long as I have an iOS device hooked up… Weird, but ok.

I had the same problem.
I made a video to show you how to fix it.