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

Getting this error.

Realm/core/librealmcore-ios.a(array_binary.o), building for iOS Simulator, but linking in object file built for iOS, for architecture arm64

Swift iOS 14 xcode 12.0.1

What I have tried :

  • Updating to the latest realm
  • Excluding the arm64 architecture

Nothing seems to work Seems realm are having issues too : https://realm.io/docs/swift/latest/#cocoapods

"Arm64 simulator architecture may not be supported for several combinations of Realm 5.x and Xcode 12. Please attempt the following workarounds if you experience architecture-related build errors with the latest version of Realm."

1 answer

  • answered 2020-10-01 09:56 Sander Saelmans

    It's not really a proper fix, but what worked for my project is:

    Now when you build your app for your device or you're archiving make sure to set this back to No, or alternatively, use a different config for this (e.g: I have Debug set to Yes, Release to No).