title: Xcode12 - building for iOS Simulator, but linking in object file built for macOS, file 'dir/SomeFile.a' for architecture x86_64
body: <p>Getting linker error in <code>Xcode 12</code> when I am trying to build my large iOS app (hybrid, swift+objc). The application is building fine for real device, but It gives linker error when I am trying to run in Simulator directly with Debug configuration.</p>
  <p>I have tried all possible solutions in other post <a href="https://stackoverflow.com/questions/63607158/xcode-12-building-for-ios-simulator-but-linking-in-object-file-built-for-ios?noredirect=1&amp;lq=1">here</a>, but unfortunately it didn't work. Although the error in other post is different. I have checked <code>Build for active architectures only</code> to YES for Debug configs and NO for Release configs.</p>
  <p>Other post error,</p>
  <blockquote>
  <p>building for iOS Simulator, but linking in object file built for iOS, for architecture arm64</p>
  </blockquote>
  <p>My error,</p>
  <blockquote>
  <p>building for iOS Simulator, but linking in object file built for macOS, file for architecture x86_64</p>
  </blockquote>
  <p><strong>How can I resolve this issue?</strong> I need to run in both iOS real device and Simulator.</p>