built for iOS, linking for simulator iOS Origin: On your device Last updated 12 Oct 2026

Building for iOS Simulator, but linking in object file built for iOS, for architecture arm64

A library contains device-only arm64 code; Apple Silicon simulators also run arm64 and need a separate simulator slice.

Exact message you may see Building for iOS Simulator, but linking in object file built for iOSbuilding for iOS Simulator-arm64 but attempting to link with file built for iOS-arm64
Seen on: iOS

Meaning

Old “fat” frameworks combine device arm64 with simulator x86_64. On Apple Silicon Macs the simulator wants arm64-simulator, which they lack. XCFrameworks solve this; excluding arm64 for the simulator is a temporary workaround that forces Rosetta.

Common causes

  • Old fat .framework/.a without arm64-simulator slice
  • Pods built with EXCLUDED_ARCHS hacks
  • Prebuilt binary SDK not updated

⚡ Quick fix

  1. Update the SDK to an XCFramework version
  2. Remove EXCLUDED_ARCHS[sdk=iphonesimulator*]=arm64 hacks once dependencies support it
  3. Temporarily run the simulator under Rosetta

Detailed fix by platform

Shell

  1. xcodebuild -create-xcframework -framework device/My.framework -framework simulator/My.framework -output My.xcframework

How to diagnose

  1. Slices — lipo -info / file on the binary
  2. Settings — EXCLUDED_ARCHS

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

cannot execute binary file — cannot execute binary file: Exec format error (Linux)cannot execute binary…exec format error — exec /usr/local/bin/docker-entrypoint.sh: exec format error (Docker)exec format errorIllegal instruction — Illegal instruction (core dumped) (SIGILL) (Linux)Illegal instructionlibrary not found for -lPods — ld: library not found for -lPods-AppName / framework not found Pods_App (iOS)library not found for…no matching manifest — no matching manifest for linux/arm64/v8 in the manifest list entries (Docker)no matching manifestnot allowed to query for scheme — -canOpenURL: failed for URL: "x://" - error: "This app is not allowed to query for scheme x" (iOS)not allowed to query …NSUnknownKeyException — NSUnknownKeyException: this class is not key value coding-compliant for the key x (iOS)NSUnknownKeyExceptionunable to dequeue a cell with identifier — unable to dequeue a cell with identifier Cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard (iOS)unable to dequeue a c…built for…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.