Xcode excludes the architecture your Mac doesn't need when building for a simulator: on Apple silicon it adds arm64 to Excluded Architectures, and on Intel Macs it adds x86_64. You add or edit that list per build configuration in the target's Build Settings, under the Excluded Architectures row, usually by typing a value such as arm64 or x86_64 for Debug only. The setting matters most when a dependency ships as a prebuilt binary for a single architecture, because lipo and the linker fail when a target and its libraries disagree about which slices exist.
That's the short answer. The rest of this article walks through the exact steps, the places the setting can hide, why the same fix sometimes seems to work and sometimes doesn't, and how to avoid the classic trap of excluding an architecture on one target while forgetting the framework or package that produced it.
What Excluded Architectures Actually Controls
Xcode builds apps from a set of build settings resolved per target and per configuration (Debug, Release, and any custom configurations you add). EXCLUDED_ARCHS is the underlying setting name; the Xcode UI labels it "Excluded Architectures." Its value is a space-separated list of architecture identifiers, and Xcode strips those architectures from the ARCHS list before compiling and linking. Common identifiers are arm64 (Apple silicon and modern iOS devices), arm64e, x86_64 (Intel Macs and the Intel simulator), and i386 (legacy 32-bit simulator, long obsolete).
Two things about the mechanism trip people up. First, exclusion is subtraction, not selection: it can't add an architecture that isn't in ARCHS already. Second, it applies where the setting resolves. A target that excludes arm64 for the simulator still builds arm64 for a physical device unless the exclusion is scoped so it can't reach the device configuration. That distinction between "simulator" and "device" is where most of the real-world nuance lives.
A related setting, ONLY_ACTIVE_ARCH, is often confused with this one. It builds just the architecture of the machine you're sitting at, usually for Debug. It's a speed optimization, not a compatibility fix. Excluding an architecture changes what a product can contain; ONLY_ACTIVE_ARCH changes what a given build bothers to produce. If your goal is to make a build succeed on one machine, ONLY_ACTIVE_ARCH may be enough. If your goal is to make the compiled artifact coherent, you need the exclusion.
Prerequisites and Where the Setting Lives
Before you start, confirm three things so you don't chase the wrong layer:
Know which configuration is failing (Debug on the simulator, Release archive, or a specific scheme). Know which architecture is causing the error. The linker message usually names it, for example "building for iOS Simulator, but linking in object file built for iOS" or "undefined symbols for architecture arm64." Know your Xcode version, because the settings editor layout has shifted over the years. The underlying keys have been stable since EXCLUDED_ARCHS was introduced in Xcode 12 in 2020, but the UI and some defaults changed around Xcode 12.5 and again in later releases. Exact clicks below reflect the modern settings editor; if your Xcode predates it, the Build Settings tab still shows the same row, just with a different visual layout.
The setting can exist in several places, and order of precedence matters. Project-level settings act as defaults; target-level settings override them; .xcconfig files override or feed into everything depending on whether the setting is defined there. A value typed at the project level will not automatically be overridden by an empty target-level value unless you set it to empty explicitly. That asymmetry explains many "I changed it and nothing happened" reports.
Step-by-Step: Adding the Exclusion in the Xcode UI
1: Open the project in Xcode and select the project in the Project Navigator. 2: In the editor, select the target that's failing to build under the TARGETS list. 3: Open the Build Settings tab. Make sure "All" is selected rather than "Basic," because the arch settings are not part of the basic set. 4: With the search field, type excluded. The Excluded Architectures row appears. 5: Expand the row. You'll see one column per configuration (Debug, Release, and any custom configurations). 6: Double-click the cell for the configuration you're fixing and add the architecture identifier, one per line in the popover if you're using the multi-value editor, or space-separated if you're editing the raw value. Typical entries are arm64 for an Intel-simulator compatibility workaround or x86_64 for the reverse. 7: Press Return or close the popover so the value commits, then clean the build folder (Product > Clean Build Folder, or Shift-Command-K) and rebuild.
Expect the previously failing link step to succeed. A quick success check: in the build log, look at the compile and link invocations for your target and confirm the architecture that was failing no longer appears in the -arch flags. If you excluded arm64 only for Debug, a Release build on the simulator should still include it.
One caution about the multi-value editor: it commits entries as separate lines, and a stray blank line or a typo like arm 64 becomes an invalid value rather than a helpful error. Xcode may quietly ignore an unrecognized identifier.
Common Scenarios and What to Exclude
The right value depends entirely on the failure. Here are the recurring cases with their reasoning.
| Scenario | Symptom | Typical exclusion | Scope |
|---|---|---|---|
| Prebuilt framework or XCFramework lacking an arm64 simulator slice | Linker error about building for iOS Simulator, linking in object file built for iOS | arm64 | Debug and Release, simulator-relevant |
| Intel Mac needing an x86_64-only dependency | Linker error on x86_64 when the library has no Intel slice | x86_64 | All configurations on Intel hardware |
| Old static library with i386-era slices | Warnings or errors around unsupported architectures | Not applicable; the architecture is obsolete | Update or replace the library |
| App target building fine while its extension or test bundle fails | The extension's link step repeats the same architecture error | Same value as the app, but add it to the extension target too | Each failing target separately |
| Swift Package Manager dependency with a binary target missing a slice | Package resolution or link failure naming the architecture | arm64 or x86_64 — whichever slice is missing | The target that consumes the package |
The key pattern in that table is that the exclusion belongs wherever the conflicting architecture is being compiled or linked. If the framework is precompiled and only one target links it, that target is the one to fix. If several targets link it, each needs the exclusion unless they inherit it from a shared configuration.
Setting It Through xcconfig and the Command Line
Many teams prefer configuration files because the setting is reviewable in version control. In an .xcconfig file, the line looks like this:
EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64
The conditional form matters. That line excludes arm64 only for simulator SDKs, leaving device builds untouched. Without the [sdk=...] bracket, the value applies to every SDK the configuration covers, which means you've accidentally excluded arm64 from your device builds too. If your device build works locally and fails only on the simulator, check whether someone wrote the unconditional version.
You can also pass it at invocation time: xcodebuild -scheme YourApp -configuration Debug EXCLUDED_ARCHS=arm64. Command-line overrides apply to that build only, which is useful for confirming that the setting is what changes the outcome before you commit it to the project. If a command-line override fixes the build, the project setting was wrong or being inherited from somewhere you didn't expect.
The bracket syntax extends beyond SDK: you can scope by architecture, by configuration, or combine conditions. Keep those overrides to a minimum, because stacked conditionals are hard to debug and the precedence between a conditional in an xcconfig and a value in the UI can surprise you.
Why the Fix Sometimes Doesn't Take Effect
When you add the exclusion and the error persists, the cause is usually one of these, roughly in order of how often they occur.
The setting went to the wrong target. Dependency frameworks, extensions, watch targets, test bundles, and app clips are separate targets with their own build settings. Your app target can exclude arm64 and still fail because a widget extension links the same offending library. Add the value to every target that fails, or move it to the project level where targets inherit it.
The framework lacks the slice you think it has. Run lipo -info path/to/Framework.framework/Framework (a stable, long-supported command-line tool) on the binary. It prints the architectures actually present. If the output shows only x86_64, excluding arm64 is correct; if it shows only arm64, you're excluding the wrong side. Guessing from documentation rather than inspecting the binary wastes a lot of time.
The build didn't clear. Cached modules and derived data can mask the change. Clean the build folder, and if that fails, delete derived data and rebuild. Xcode's incremental build system is usually right, but architecture changes are exactly the kind of input it can miss.
A package or CocoaPods integration is regenerating settings. If you edit build settings by hand and then run a dependency manager that regenerates the project, your edits can be overwritten. Put the exclusion in the source of truth the tool respects — a Podfile post-install hook, a package manifest workaround, or a shared xcconfig — rather than editing generated settings.
Two configurations disagree. The build that fails may be Release while you fixed Debug. Check all configurations in the row, not just the one you had open.
The setting is being overridden downstream. If the value appears greyed out or shows a hierarchy, something at a lower precedence is winning. Switch the settings editor to the level that owns the value, or use xcodebuild -showBuildSettings to see the resolved value per target.
How to Verify the Result
After the fix, verify at three levels rather than just watching for a green build.
First, inspect the resolved setting. Running xcodebuild -showBuildSettings -target YourTarget prints EXCLUDED_ARCHS and ARCHS as Xcode resolves them, which shows whether inheritance and conditionals produced what you intended.
Second, check the built product's slices. For a framework or binary, lipo -info on the produced artifact lists what's inside. For an app, the binary inside the app bundle is what gets linked and later signed.
Third, confirm the failing configuration is the one you fixed by building it explicitly, not by pressing Run with a scheme that defaults to a different configuration.
If you're maintaining a CI pipeline, remember that an Intel runner and an Apple-silicon runner resolve differently. A Debug build that relies on ONLY_ACTIVE_ARCH will behave differently across those machines, so the CI configuration should specify its destinations explicitly and the exclusions should be scoped tightly enough that CI and local builds agree.
What Excluding an Architecture Costs You
Excluding an architecture is a workaround, not a fix, and it has real costs you should weigh before adopting it.
You lose the ability to run or ship that architecture's code path. Excluding arm64 for the simulator means nobody on an Apple-silicon Mac can run the app in the simulator — which, on a modern development team, is most of the team. Excluding x86_64 similarly locks out Intel Macs. That's acceptable as a temporary unblock but corrosive as a permanent policy.
It masks the underlying dependency problem. The library needs an updated build with the missing slice. Every quarter this stays in place, the more likely it is that the dependency quietly ages out of support.
It can create device/artifact divergence. If exclusions are scoped too broadly, the artifact you test and the artifact you ship can differ in architectures, and only the archive reveals it. The fix is to keep exclusions conditional on the simulator SDK, or to use ONLY_ACTIVE_ARCH for local Debug builds when that's sufficient.
It creates friction for new developers. A fresh clone reproduces your environment only if the settings live in shared configuration files. Settings stored only in the local user data or in a modified project that's regenerated are invisible to the next person, who then spends an afternoon rediscovering the same linker error.
A practical rule: if the exclusion is only needed on one developer's machine or one CI lane, scope it to that configuration and revisit it every time you update the dependency. If the dependency is maintained by your team, the right move is to rebuild it as an XCFramework with both slices, which makes the exclusion unnecessary and removes the trade-off entirely.
Choosing Between Excluding, ONLY_ACTIVE_ARCH, and Updating the Dependency
These three options solve overlapping problems with different side effects, and picking the right one comes down to what you're actually trying to accomplish.
If the goal is faster local Debug builds and you're on one Mac, ONLY_ACTIVE_ARCH set to Yes for Debug is the cleanest change. It doesn't alter what your product can contain and doesn't create cross-machine confusion, but it also doesn't fix a linker mismatch that's caused by a library's missing slice — that's a different problem.
If the goal is to unblock a build where a precompiled dependency lacks a requested architecture, the exclusion is the direct lever, and the right scope is usually the simulator SDK plus the single failing target.
If the goal is a durable fix, updating or rebuilding the dependency is the only option that removes the workaround from your project entirely. That's more work upfront and often impossible with third-party binaries you can't rebuild, in which case the exclusion stays and should be documented in the project.
In practice, many teams end up with a combination: ONLY_ACTIVE_ARCH for local Debug speed, a narrowly scoped EXCLUDED_ARCHS line in a shared xcconfig for the one stubborn dependency, and a tracked issue to drop the workaround when the dependency ships a universal build.
Cross-Platform Differences Worth Knowing
The setting behaves consistently across iOS, macOS, tvOS, and watchOS, but the hardware landscape makes it more relevant on some platforms. On iOS, the simulator on Apple silicon needs arm64; a dependency built only for devices will fail there, and excluding arm64 for the simulator is the common workaround. On macOS, arm64 and x86_64 both appear in shipped apps, so exclusions scoped to the simulator SDK still leave the device build complete, but an unconditional exclusion would strip a slice from the shipped Mac app and can break notarization expectations.
For watchOS, the simulator is arranged differently and architecture names can be more confusing than the iOS case; verify the actual failing architecture in the log rather than assuming the same value from an iOS fix. For Mac Catalyst, the target is compiled for macOS architectures, and copying an iOS exclusion verbatim usually produces the wrong result. Notice that none of these differences changes the mechanism — they change which identifier belongs in the cell and which scope should hold it. When in doubt, read the architecture name out of the error message and inspect the dependency with lipo.
A note on Xcode versions: the underlying build setting has been stable since Xcode 12, but defaults changed in Xcode 12.5, and later releases have adjusted what the settings editor displays. If you're following older tutorials, the setting is the same but the way to reach it may differ. The project's Build Settings tab has always been the fallback.
A Worked Example End to End
Suppose your app builds for the simulator on an Intel Mac but fails on an Apple-silicon Mac with a linker error naming arm64, and you've confirmed that a third-party framework was built only for x86_64. Here's the full sequence, with the arithmetic of the diagnosis stated explicitly.
The error says the link step requested arm64 but the object files are for x86_64. lipo -info on the framework confirms only x86_64 is present. Your app target excludes nothing, so its ARCHS for the simulator includes both arm64 and x86_64; this is why the Intel Mac succeeds (the framework slice matches) and the Apple-silicon Mac fails (there is no arm64 slice to link against). The fix is to remove arm64 from the requested set for simulator builds, which you do in Debug and Release for that target. Rebuild on the Apple-silicon machine; the link step now requests only x86_64, which matches the framework, and the build succeeds. xcodebuild -showBuildSettings shows the exclusion in effect and the reduced ARCHS. The dependency still doesn't run natively on Apple silicon, so the workaround is temporary until the vendor ships a universal build.
This is a two-slice problem with a simple rule: the architecture you exclude is the one present in ARCHS but absent from the dependency. That's why checking the dependency's actual slices, rather than its README, is the diagnostic step that saves the most time.
When to Stop and Involve Someone Else
The steps above cover ordinary build-setting changes on your own project. Stop and get help from the dependency's maintainer, or from whoever owns your build configuration, when the exclusion seems to fix one target but the archive still fails, when signing or notarization behavior changes after you adjust architectures, when a third-party binary lacks a slice and the vendor isn't responding, or when your CI and local builds disagree in ways a scoped exclusion can't reconcile. Those are signs that the problem has moved beyond a settings mismatch into packaging or distribution, and a narrow workaround will hide it rather than resolve it. It's also the right moment to document exactly what you excluded and why, so the next person inherits a decision instead of a mystery.