Simulator build fails because a library was built for real iPhones
building for 'iOS-simulator', but linking in object file (…) built for 'iOS'Short answer
The linker was building for the Simulator and met a library compiled only for physical iPhones. On an Apple silicon Mac both are arm64, so the architecture matches but the platform does not. Ask the named file which platform it was built for, then update that pod or framework to an XCFramework, remove old EXCLUDED_ARCHS overrides, reinstall pods, and keep Xcode out of Rosetta.
Fix it fast
1Find out which cause you have
Copy the path of the library from the error and ask it which platform each slice was built for. A slice that says IOS where the build wanted IOSSIMULATOR means the binary itself is wrong; if every slice says IOSSIMULATOR, the build settings are the problem.
xcrun vtool -show-build path/to/Vendor.framework/Vendor | grep -E 'architecture|platform'2Match what you see, then jump to its fix
- 1
The path in the error ends in a .framework or .a inside ios/Pods, and vtool shows 'platform IOS' for arm64A pod or plugin ships a binary with no arm64 Simulator sliceFix - 2
The project builds on an Intel Mac and fails on Apple silicon, or the log also mentions x86_64 or 'Undefined symbols for architecture x86_64'Old architecture overrides force the wrong Simulator sliceFix - 3
The error started right after a Flutter, Xcode or plugin upgrade and names a file under ios/Pods or DerivedDataPods and build products are stale after an upgradeFix - 4
Every target builds for x86_64, or sysctl.proc_translated prints 1Xcode or the terminal runs under RosettaFix
- 1
What does the error look like?
building for 'iOS-simulator', but linking in object file (…) built for 'iOS'building for iOS Simulator, but linking in object file built for iOS, for architecture arm64is missing architecture(s) required by this target (arm64), but may still be link-compatibleclang: error: linker command failed with exit code 1 (use -v to see invocation)
Cause 1 of 4
A pod or plugin ships a binary with no arm64 Simulator slice
1Check
Older vendor SDKs were packed as one fat binary: arm64 for devices plus x86_64 for Intel Simulators. On Apple silicon the Simulator also needs arm64, and a single binary cannot hold two arm64 slices for different platforms, so the device slice gets linked and rejected. lipo shows the architectures and vtool the platform of each.
lipo -info ios/Pods/VendorSDK/VendorSDK.framework/VendorSDK
xcrun vtool -show-build ios/Pods/VendorSDK/VendorSDK.framework/VendorSDK | grep -E 'architecture|platform'2Fix
Update the Flutter plugin or pod that brings the binary in; most vendors now ship an XCFramework with separate device and Simulator folders. If the library is yours, archive it once for each platform and join the archives into an XCFramework. Only while you wait for a vendor fix, Apple allows excluding arm64 for the Simulator SDK alone and running on a Rosetta Simulator destination, then removing that setting once the update lands.
flutter pub outdated
flutter pub upgrade some_plugin
# your own framework: one archive per platform, then one XCFramework
xcodebuild archive -scheme VendorSDK -destination "generic/platform=iOS" -archivePath build/VendorSDK-iOS SKIP_INSTALL=NO
xcodebuild archive -scheme VendorSDK -destination "generic/platform=iOS Simulator" -archivePath build/VendorSDK-Sim SKIP_INSTALL=NO
xcodebuild -create-xcframework \
-archive build/VendorSDK-iOS.xcarchive -framework VendorSDK.framework \
-archive build/VendorSDK-Sim.xcarchive -framework VendorSDK.framework \
-output build/VendorSDK.xcframework3Verify
The new copy has a Simulator folder whose binary reports IOSSIMULATOR, and the Simulator build links.
ls build/VendorSDK.xcframework
flutter build ios --simulatorCause 2 of 4
Old architecture overrides force the wrong Simulator slice
1Check
A common workaround from the first Apple silicon years put EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64 (or a VALID_ARCHS list) into the Podfile or the Runner target. Mixed with pods that now build arm64 Simulator code, the app and its libraries no longer agree on one slice. Look for those settings in both places and in what Xcode actually resolves.
grep -n "EXCLUDED_ARCHS\|VALID_ARCHS" ios/Podfile ios/Runner.xcodeproj/project.pbxproj
xcodebuild -workspace ios/Runner.xcworkspace -scheme Runner -sdk iphonesimulator \
-showBuildSettings | grep -E "^ *(ARCHS|EXCLUDED_ARCHS|ONLY_ACTIVE_ARCH) ="2Fix
Delete the overrides so every target falls back to Xcode's defaults; remove VALID_ARCHS entirely rather than leaving it empty. In a Flutter app the Podfile's post_install block only needs Flutter's own helper, which already sets the Simulator flags the engine expects.
# ios/Podfile
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end3Verify
Reinstall pods and confirm arm64 no longer appears in the resolved EXCLUDED_ARCHS for the Simulator.
cd ios && pod install && cd ..
flutter build ios --simulatorCause 3 of 4
Pods and build products are stale after an upgrade
1Check
Podfile.lock pins the pod versions you installed months ago, and DerivedData can keep linking an object compiled before the fix. Compare what is installed with what is available.
cd ios && pod outdated2Fix
Clear Flutter's and Xcode's build output, let the pods resolve again, and reinstall. If your Flutter version uses Swift Package Manager for plugins, plugins that support it no longer go through CocoaPods at all; the CocoaPods registry becomes read-only on 2 December 2026, so a vendor fix may only arrive as a Swift package.
flutter clean
rm -rf ios/Pods ios/Podfile.lock ~/Library/Developer/Xcode/DerivedData/Runner-*
flutter pub get
cd ios && pod install --repo-update3Verify
Podfile.lock now lists the newer pod versions and the Simulator build links.
git diff --stat ios/Podfile.lock
flutter build ios --simulatorCause 4 of 4
Xcode or the terminal runs under Rosetta
1Check
Opening your terminal (or an older Xcode) with 'Open using Rosetta', or installing CocoaPods with an Intel Homebrew under /usr/local, makes the tools think the Mac is Intel. The build then picks x86_64 Simulator slices and clashes with libraries that only ship arm64 for the Simulator. Apple's own note says not to launch Xcode under Rosetta to get around these link errors.
sysctl -n sysctl.proc_translated # 1 = translated, 0 = native
uname -m
which pod2Fix
Turn off 'Open using Rosetta' in Finder > Get Info for your terminal app (and for Xcode, if the box is shown), open a new window, and reinstall CocoaPods with the arm64 Homebrew in /opt/homebrew. Do not lean on Rosetta Simulator destinations as a fix: Apple says macOS 27 is the last release with general Rosetta support.
brew install cocoapods # /opt/homebrew/bin/brew on Apple silicon
which pod # expect /opt/homebrew/bin/pod3Verify
The terminal reports a native arm64 shell and the Simulator build succeeds.
sysctl -n sysctl.proc_translated
flutter build ios --simulatorHow do I stop it coming back?
- Before adding a binary SDK, check that it ships as an XCFramework with an ios-arm64_x86_64-simulator (or ios-arm64-simulator) folder.
- Keep architecture settings at Xcode's defaults; if you must exclude something for a vendor, write a comment with the date and the version that will remove it.
- Run a Simulator build in CI on an Apple silicon runner, so a device-only binary fails there and not on a teammate's laptop.
- Move plugins to Swift Package Manager where they support it, and remove CocoaPods once every dependency does.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- Dispatch ProA real-time logistics platform: Flutter apps, Spring Boot services and a Kafka event pipeline on AWS.
- Qist BazaarA buy-now-pay-later marketplace built from a blank repo, now past 100K downloads on Google Play.
Related fixes
Mobile apps
flutter doctor says the Android cmdline-tools component is missing
Android license status unknown.
Flutter checks for a cmdline-tools folder inside the Android SDK it found, and stops the Android checks when that folder is absent.
6 causes, each with a fixMobile apps
Apple rejected the app under Guideline 4.3, Design: Spam
Guideline 4.3(b) - Design - Spam
Guideline 4.3 is Apple's duplicate rule.
5 causes, each with a fixMobile apps
pod install cannot pick a version of a pod that satisfies every requirement
Specs satisfying the `FirebaseAuth (~> 11.0)` dependency were found, but they required a higher minimum deployment target.
CocoaPods tried every version of the named pod and none fit all requirements.
4 causes, each with a fixMobile apps
flutter run says: Could not run Runner.app, try Xcode Product > Run
Try launching Xcode and selecting "Product > Run" to fix the problem:
Flutter prints this when installing or launching the built app on the iPhone fails, and it hides the real reason.
4 causes, each with a fixMobile apps
flutter doctor says CocoaPods is installed but not working
You appear to have CocoaPods installed but it is not working.
Flutter runs pod --version and treats a failed or unreadable result as a broken install.
3 causes, each with a fixMobile apps
flutter run on iOS or macOS stops with Error running pod install
Warning: CocoaPods not installed. Skipping pod install.
Flutter only reports that pod install failed; the reason is in the lines just above it.
5 causes, each with a fix