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

Recently, I have updated my Xcode to the latest version (Version 12.2 (12B45b), and my project running fine for real devices. But when I try to run on iOS Simulator I am getting the following error.

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

To solve this problem we have to exclude arm64 for simulator architecture both from your project and the pod target.