With Xcode 12.1, I was addicted to the actual build and archive for several hours due to the following error.
line 144: ARCHS[@]: unbound variable
Command PhaseScriptExecution failed with a nonzero exit code
I was able to solve it by the following method.
--Added VALID_ARCHS
to Build Setting-> User Defined of the project. The value is $ (ARCHS_STANDARD)
--Changed the Base SDK of the Pods project from macOS to iOS after pod install (because the value of ARCHS_STANDARD is different from iOS on macOS)
The following will come out as a solution, but it will not be implemented --Add arm64 to Excluded Architecture