How to Solve Xcode M1 simulator Error

Error reported by Xcode M1 simulator

Operation error:

1.building for iOS Simulator, but linking in object file built for iOS, for architecture arm64
2.The linked framework ‘Pods.framework’ is missing one or more architectures required by this target: arm64

Solution:
1 Build settings change:

2 Podfile add:

 post_install do |installer|
   installer.pods_project.build_configurations.each do |config|
     config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
   end
 end

3.xcode clean;
4. pod install

Pod installation errors:

sudo arch -x86_64 gem install ffi
gem install ffi --version 1.13.1 --user-install
arch -x86_64 pod install

Read More: