I have upgraded my Xcode from 10.3 to 12.4, but got the two annoying issues when I built and run previous app project with new upgraded Xcode.
Issue #1
Got following build error when I built the old project with Xcode 12.4 (it is good with Xcode 10.3).
ld: in /Users/project_path/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIUtil.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/project_path/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Issue #1 Solution
Go to Build Settings -> Excluded Architecture and set arm64 in the excluded architecture as following screenshot.
Then I can build the project successfully.

Issue #2
I got another error when trying to run the app in simulator as following:
The file “app_name” couldn’t be opened because you don’t have permission to view it.

Issue #2 Solution
- Choose PROJECT and then go to
Build Settings->User-Defined, and delete wholeVALID_ARCHS. - Choose TARGETS and then go to
Build Settings-> delete wholeVALID_ARCHS.

Issue #3
Even though I can run the app in simulator, but got following error when trying to run in iPhone XR device.

This does because we added arm64 into the Excluded Architecture, so need to delete the added item when trying to run in a real device instead of simulator.
Summary
Finally, I can run the app with Xcode 12.4 and simulator and my iPhone device.