BugMedic

building for iOS Simulator, but linking in object file built for iOS: get a simulator slice

The linker is building for the iOS Simulator but was handed a binary compiled only for iOS devices; find the device-only library and replace it with a build that includes a simulator slice.

By BugMedic editorial teamLast source review: 2026-09-27macOS

A device-only (iphoneos) binary is being linked into a simulator (iphonesimulator) build. Find the file named in the error, confirm with lipo -info that it lacks a simulator slice, and replace it with an XCFramework — Apple's format for shipping binaries that cover multiple platforms — that includes one.

Try these fixes in order

01

Identify the file named in the error

The error message names the offending file, for example .../libSomething.a or .../Something.framework/Something. Note exactly which dependency ships it: the fix belongs to that dependency's packaging, not to your project's build settings.

02

Confirm the missing simulator slice

Run lipo -info against the named binary. A device-only binary lists only iphoneos architectures (for example 'arm64'), while a simulator-capable binary also lists an iphonesimulator slice. If no iphonesimulator slice appears, you have confirmed the cause: there is nothing for the simulator link to use.

lipo -info path/to/TheLibrary.a
03

Replace it with an XCFramework build

The supported packaging for a binary that must work on both device and simulator is an XCFramework: Apple's developer documentation says that to distribute code in binary form, you create an XCFramework bundle containing the binaries. Get an XCFramework build of the dependency from its vendor, or produce one yourself by building both the iphoneos and iphonesimulator slices and packaging them as an XCFramework. Replace the device-only binary with the XCFramework build.

04

Rebuild for the simulator and verify

Rebuild for the simulator. The error is gone when the link step completes. As a sanity check, run lipo -info on the new artifact and confirm it now reports both an iphoneos slice and an iphonesimulator slice.

Interpret what you see

The error names a .framework file inside a third-party SDK

What it suggests: The vendor shipped a device-only binary with no simulator slice.

Next check: Ask the vendor for an XCFramework build, or check whether a newer release already ships one.

The error names a .a static library built from your own source

What it suggests: You (or your build script) produced only the iphoneos slice.

Next check: Build the iphonesimulator slice as well and combine both with xcodebuild -create-xcframework.

The failure happens on an Apple Silicon Mac but not on an Intel Mac

What it suggests: On Apple Silicon the simulator and the device share arm64, so a device-only arm64 slice reaches the link step and fails on platform rather than architecture.

Next check: Check whether the binary has an arm64 slice tagged for the simulator; if not, you need a simulator slice regardless of architecture.

Device builds succeed and only simulator builds fail

What it suggests: The binary simply has no simulator slice at all; device builds link fine because they match.

Next check: Obtain a simulator-capable build of that dependency instead of changing your project's settings.

Why this happens

  • A dependency is distributed as a device-only binary: it contains an iphoneos (iOS) slice but no iphonesimulator slice, so the simulator link has nothing compatible to use.
  • On Apple Silicon Macs the simulator runs arm64 — the same architecture as the device — so an arm64 device-only slice no longer fails with an architecture mismatch but with this platform mismatch; older fat binaries built only for device never included a simulator slice in the first place.

Still not working?

If the steps fail, record the exact file path from the error, the output of lipo -info on that file, which dependency ships it, and whether the vendor offers an XCFramework or simulator-capable build. Note which Mac architecture you build on, since Apple Silicon simulators need an arm64 simulator slice that device-only binaries lack.

Official sources

These steps are based on the linked documentation and general diagnostics. BugMedic has not independently tested every product and system configuration. Review commands before running them.

Related Xcode guides