built for iOS, linking for simulator 🍎 iOS

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.

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:

🧠 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.