title: React Native on Apple Silicon M1 - The linked library 'libPods-ProjectName.a' is missing one or more architectures required by this target: x86_64
body: <p>I'm trying to build a React Native project on a MacBook Pro with a M1 architecture, for iOS simulator.</p>
  <p>The project built nicely on Intel architecture.</p>
  <p>It also build on device and archive well on M1. But not on simulator.</p>
  <p>I had this classical error when switching to the M1 chipset.</p>
  <blockquote>
  <p>in /project-folder/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a(cryptlib.o), building for iOS Simulator, but linking in object file built for iOS, file '/project-folder/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a' for architecture arm64</p>
  </blockquote>
  <p>I added arm64 to excluded architectures.</p>
  <p>I also added the following snippet but it also react the same way without it.</p>
  <pre><code>post_install do |installer|
    installer.pods_project.build_configurations.each do |config|
      config.build_settings[&quot;EXCLUDED_ARCHS[sdk=iphonesimulator*]&quot;] = &quot;arm64&quot;
    end
  end
  </code></pre>
  <p>Now I have:</p>
  <blockquote>
  <p>/project-folder/ios/ProjectName.xcodeproj The linked library 'libPods-ProjectName.a' is missing one or more architectures required by this target: x86_64.</p>
  </blockquote>
  <p>I tried to add x86_64 on the list of architectures of the project, with no results.</p>
  <p>I'm building from Xcode IDE. This error message appears for all iPhones I tried: 8, 11, 12 and all targets I tried: iOS 9, 10 and 13.</p>