The Error “building for iOS Simulator, but linking in object file built for iOS, for architecture arm64”, is an error that is invoked when you are working on Xcode 12 beta version to prepare for the new ios 14. Given below is the snippet of the error you might get:
building for iOS Simulator, but linking in object file built for iOS, for architecture arm64
I would like to share with you the steps I took to fix the “building for iOS Simulator, but linking in object file built for iOS, for architecture arm64”
Why “building for iOS Simulator, but linking in object file built for iOS, for architecture arm64” Error is Seen?
The error, “building for iOS Simulator, but linking in object file built for iOS, for architecture arm64” is seen because you have not updated the CocoaPods or the dependencies for your library/app.
The error is also seen if you have included arm64 for the simulator architecture from your project or the pod project.
The detailed solution to fix the error “building for iOS Simulator, but linking in object file built for iOS, for architecture arm64”, is given below:
How to fix the error “building for iOS Simulator, but linking in object file built for iOS, for architecture arm64”?
To fix the error, you will have to exclude arm64
for the simulator architecture, from your project as well as the Pod project. In case you are using custom XCConfig
files, you will have to edit the lines in order to exclude simulator architecture.
Always update to the latest Xcode version from Apple Developer official webpage to fix any issue specific to any Xcode Beta version.


To fix the error, “building for iOS Simulator, but linking in object file built for iOS, for architecture arm64”, you will have to follow one of the below-mentioned methods:
Method 1: Exclude arm64 for the simulator architecture
To fix the error, you have to exclude arm64
for the simulator architecture, from your project as well as your Pod project,
To exclude arm64
, you have to navigate to Build Settings of your project and add Any iOS Simulator SDK with value arm64
inside Excluded Architecture. You may have a look at the below mentioned image as a reference:

This should fix the error, “building for iOS Simulator, but linking in object file built for iOS, for architecture arm64”
Method 2: Custom XCConfig files mehtod
In case you are using custom XCConfig
files, you have add the below mentioned line for excluding the simulator architecture from your project:
EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64
Once you have done the above mentioned steps, you have to do the same for the Pod project until all the Cocoa pod vendors are done adding the below mentioned code in their Podspec.
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
You can also manually add the Excluded Architecture in your Pod project’s Build Settings, but if you do this it will be overwritten when you use the following command pod install
.
If you do not want to overwrite your code, you have to add the below mentioned snippet in your Podfile
:
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
The above mentioned code will write all the necessary Build settings every time you run pod install.
This should fix the error, “building for iOS Simulator, but linking in object file built for iOS, for architecture arm64”
Conclusion
To fix the error “building for iOS Simulator, but linking in object file built for iOS, for architecture arm64”, you will have to exclude arm64
for the simulator architecture, from your project as well as the Pod project.
In case you are using custom XCConfig
files, you will have to edit the lines in order to exclude simulator architecture.